Browse Source

Merge pull request #13 from tcbrindle/develop

Fix for Clang not working with MacOS
default_compile_flags
vector-of-bool 4 years ago
parent
commit
7783e813ef
No account linked to committer's email address
1 changed files with 10 additions and 3 deletions
  1. +10
    -3
      src/dds/toolchain/from_dds.cpp

+ 10
- 3
src/dds/toolchain/from_dds.cpp View File

if (!compiler_id) { if (!compiler_id) {
fail(context, "Cannot deduce library file extension without Compiler-ID"); fail(context, "Cannot deduce library file extension without Compiler-ID");
} }
if (is_gnu) {
if (is_gnu_like) {
return ".a"; return ".a";
} else if (is_msvc) { } else if (is_msvc) {
return ".lib"; return ".lib";
if (!compiler_id) { if (!compiler_id) {
fail(context, "Cannot deduce object file extension without Compiler-ID"); fail(context, "Cannot deduce object file extension without Compiler-ID");
} }
if (is_gnu) {
if (is_gnu_like) {
return ".o"; return ".o";
} else if (is_msvc) { } else if (is_msvc) {
return ".obj"; return ".obj";
string_seq ret; string_seq ret;
if (is_msvc) { if (is_msvc) {
ret = {get_compiler(language::cxx), "/nologo", "/EHsc", "<IN>", "/Fe<OUT>"}; ret = {get_compiler(language::cxx), "/nologo", "/EHsc", "<IN>", "/Fe<OUT>"};
} else if (is_gnu_like) {
} else if (is_gnu) {
ret = {get_compiler(language::cxx), ret = {get_compiler(language::cxx),
"-fPIC", "-fPIC",
"-fdiagnostics-color", "-fdiagnostics-color",
"-pthread", "-pthread",
"-lstdc++fs", "-lstdc++fs",
"-o<OUT>"}; "-o<OUT>"};
} else if (is_clang) {
ret = {get_compiler(language::cxx),
"-fPIC",
"-fdiagnostics-color",
"<IN>",
"-pthread",
"-o<OUT>"};
} else { } else {
assert(false && "No link-exe command"); assert(false && "No link-exe command");
std::terminate(); std::terminate();

Loading…
Cancel
Save