You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if os.path.basename(env["CXX"]).startswith(("clang", "clang++")) :
First, accepting "clang" as a valid C++ compiler when it's the C driver is a bit weird, and this will obviously won't work if clang++ is used under any other valid name such as c++ or clang++50 etc. I'm not sure how scons usually work out compilers IDs, but in this case the only way I see would be to get it from a "$CXX -v" invokation, what would you think of the following?
--- BuildTools/SCons/SConscript.boot.orig 2017-11-28 12:51:50 UTC+++ BuildTools/SCons/SConscript.boot@@ -1,4 +1,4 @@-import sys, os, re, platform, hashlib+import sys, os, re, platform, hashlib, subprocess
sys.path.append(Dir("#/BuildTools/SCons").abspath)
################################################################################
@@ -343,7 +343,9 @@ elif env["PLATFORM"] == "sunos" :
#env.Append(CXXFLAGS = ["-z verbose"])
pass
else :
- if os.path.basename(env["CXX"]).startswith(("clang", "clang++")) :+ cxx_p = subprocess.Popen([os.path.basename(env["CXX"]),"-v"], stderr=subprocess.PIPE)+ cxx_id = cxx_p.communicate()[1]+ if "clang" in cxx_id:
env.Append(CXXFLAGS = [
"-Weverything",
"-Wno-unknown-warning-option", # To stay compatible between CLang versions
Thanks for that promising client & keep up the work!
The text was updated successfully, but these errors were encountered:
Hello,
I'm trying to build swift on a FreeBSD system, and one of my issues is that the SConscript.boot code try to identify compiler by executable basename:
swift/BuildTools/SCons/SConscript.boot
Line 348 in c5ff370
First, accepting "clang" as a valid C++ compiler when it's the C driver is a bit weird, and this will obviously won't work if clang++ is used under any other valid name such as c++ or clang++50 etc. I'm not sure how scons usually work out compilers IDs, but in this case the only way I see would be to get it from a "$CXX -v" invokation, what would you think of the following?
Thanks for that promising client & keep up the work!
The text was updated successfully, but these errors were encountered: