rust.inc: ensure proper flags are given to rustllvm

rustllvm ships some c++ code that we need to ensure is built with the
flags we want. Abuse an existing variable to make this happen.

This should fix our issues with the libstdc++ cxx11 abi (_GLIBCXX_USE_CXX11_ABI).
This commit is contained in:
Cody P Schafer
2016-09-25 02:30:46 -04:00
parent 9b8d884d6b
commit 41800bdd99
+7
View File
@@ -359,6 +359,13 @@ def rust_gen_mk_cfg(d, thing):
if r:
raise Exception
o.write("OBJCOPY_{} := {}objcopy\n".format(sys, prefix))
# Note: this isn't how this variable is supposed to be used, but for
# non-msvc platforms nothing else touches it.
# These are the only extra flags passed to the rustllvm (c++ code) build.
# These are only used for host (even though we emit them for all targets)
# Without this, there are link failures due to GLIBC_CXX11_ABI issues in
# certain setups.
o.write("EXTRA_RUSTLLVM_CXXFLAGS_{} := {}\n".format(sys, cxxflags_for(d, thing)))
o.close()
i.close()