Make rustc's host triple agree with the build system's
This commit is contained in:
parent
0148daa058
commit
ab8338fb5a
@ -198,7 +198,7 @@ endif
|
|||||||
|
|
||||||
STAGE$(1) := $$(Q)$$(call CFG_RUN_TARG,stage$(1), \
|
STAGE$(1) := $$(Q)$$(call CFG_RUN_TARG,stage$(1), \
|
||||||
$$(CFG_VALGRIND_COMPILE$(1)) stage$(1)/bin/rustc$$(X) \
|
$$(CFG_VALGRIND_COMPILE$(1)) stage$(1)/bin/rustc$$(X) \
|
||||||
$$(CFG_RUSTC_FLAGS) --target=$(2))
|
$$(CFG_RUSTC_FLAGS))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
FUZZ := stage1/bin/fuzzer$(X)
|
FUZZ := stage1/bin/fuzzer$(X)
|
||||||
|
@ -189,7 +189,7 @@ CTEST_COMMON_ARGS$(2) := --compile-lib-path stage$(2)/lib \
|
|||||||
--run-lib-path stage$(2)/lib/$$(CFG_HOST_TRIPLE) \
|
--run-lib-path stage$(2)/lib/$$(CFG_HOST_TRIPLE) \
|
||||||
--rustc-path stage$(2)/bin/rustc$$(X) \
|
--rustc-path stage$(2)/bin/rustc$$(X) \
|
||||||
--stage-id stage$(2) \
|
--stage-id stage$(2) \
|
||||||
--rustcflags "--target=$$(CFG_HOST_TRIPLE) $$(CFG_RUSTC_FLAGS)" \
|
--rustcflags "$$(CFG_RUSTC_FLAGS)" \
|
||||||
$$(CTEST_TESTARGS) \
|
$$(CTEST_TESTARGS) \
|
||||||
|
|
||||||
CFAIL_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \
|
CFAIL_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \
|
||||||
|
@ -309,7 +309,15 @@ fn build_target_config(sopts: @session::options) -> @session::config {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn host_triple() -> str {
|
fn host_triple() -> str {
|
||||||
str::str_from_cstr(llvm::llvm::LLVMRustGetHostTriple())
|
// Get the host triple out of the build environment. This ensures that our
|
||||||
|
// idea of the host triple is the same as for the set of libraries we've
|
||||||
|
// actually built. We can't just take LLVM's host triple because they
|
||||||
|
// normalize all ix86 architectures to i386.
|
||||||
|
// FIXME: Instead of grabbing the host triple we really should be
|
||||||
|
// grabbing (at compile time) the target triple that this rustc is
|
||||||
|
// built with and calling that (at runtime) the host triple.
|
||||||
|
let ht = #env("CFG_HOST_TRIPLE");
|
||||||
|
ret ht != "" ? ht : fail "rustc built without CFG_HOST_TRIPLE";
|
||||||
}
|
}
|
||||||
|
|
||||||
fn build_session_options(binary: str, match: getopts::match)
|
fn build_session_options(binary: str, match: getopts::match)
|
||||||
|
Loading…
Reference in New Issue
Block a user