Skip to content

Commit

Permalink
fix detection of libc++ for clang in OSX (#13359)
Browse files Browse the repository at this point in the history
  • Loading branch information
memsharded authored Mar 9, 2023
1 parent 7d2c153 commit 16f5e48
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions conans/client/conf/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,19 @@ def _detect_compiler_version(result):
elif compiler == "clang":
if platform.system() == "FreeBSD":
result.append(("compiler.libcxx", "libc++"))
elif platform.system() == "Darwin":
result.append("compiler.libcxx", "libc++")
elif platform.system() == "Windows":
# It could be LLVM/Clang with VS runtime or Msys2 with libcxx
result.append(("compiler.runtime", "dynamic"))
result.append(("compiler.runtime_type", "Release"))
result.append(("compiler.runtime_version", "v143"))
ConanOutput().warning("Assuming LLVM/Clang in Windows with VS 17 2022")
ConanOutput().warning("If Msys2/Clang need to remove compiler.runtime* and "
"define compiler.libcxx")
else:
if platform.system() == "Windows":
# It could be LLVM/Clang with VS runtime or Msys2 with libcxx
result.append(("compiler.runtime", "dynamic"))
result.append(("compiler.runtime_type", "Release"))
result.append(("compiler.runtime_version", "v143"))
ConanOutput().warning("Assuming LLVM/Clang in Windows with VS 17 2022")
ConanOutput().warning("If Msys2/Clang need to remove compiler.runtime* and "
"define compiler.libcxx")
else:
libcxx = _detect_gcc_libcxx(version, "clang++")
result.append(("compiler.libcxx", libcxx))
libcxx = _detect_gcc_libcxx(version, "clang++")
result.append(("compiler.libcxx", libcxx))
elif compiler == "sun-cc":
result.append(("compiler.libcxx", "libCstd"))
elif compiler == "mcst-lcc":
Expand Down

0 comments on commit 16f5e48

Please sign in to comment.