|
|
|
|
|
|
|
|
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(); |