Kaynağa Gözat

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 4 yıl önce
ebeveyn
işleme
e05237b068
1 değiştirilmiş dosya ile 8 ekleme ve 1 silme
  1. +8
    -1
      src/dds/toolchain/from_dds.cpp

+ 8
- 1
src/dds/toolchain/from_dds.cpp Dosyayı Görüntüle

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

Yükleniyor…
İptal
Kaydet