Explorar el Código

Don't attempt to link libstdc++fs when using Clang

On MacOS and (I think) most BSDs the default standard library is libc++, and so attempting to link with libstdc++fs does not work.

On Linux, where (AFAIK) most distros use Clang/libstdc++, this is going to mean link-time failures when using std::filesystem. In this case the user can add Link-Flags: -lstdc++fs to their toolchain file themselves as a fix.
default_compile_flags
Tristan Brindle hace 4 años
padre
commit
e05237b068
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. +8
    -1
      src/dds/toolchain/from_dds.cpp

+ 8
- 1
src/dds/toolchain/from_dds.cpp Ver fichero

@@ -570,7 +570,7 @@ toolchain dds::parse_toolchain_dds(const lm::pair_list& pairs, strv context) {
string_seq ret;
if (is_msvc) {
ret = {get_compiler(language::cxx), "/nologo", "/EHsc", "<IN>", "/Fe<OUT>"};
} else if (is_gnu_like) {
} else if (is_gnu) {
ret = {get_compiler(language::cxx),
"-fPIC",
"-fdiagnostics-color",
@@ -578,6 +578,13 @@ toolchain dds::parse_toolchain_dds(const lm::pair_list& pairs, strv context) {
"-pthread",
"-lstdc++fs",
"-o<OUT>"};
} else if (is_clang) {
ret = {get_compiler(language::cxx),
"-fPIC",
"-fdiagnostics-color",
"<IN>",
"-pthread",
"-o<OUT>"};
} else {
assert(false && "No link-exe command");
std::terminate();

Cargando…
Cancelar
Guardar