Skip to content

Commit ebe59ad

Browse files
committed
---
yaml --- r: 5624 b: refs/heads/master c: ab8338f h: refs/heads/master v: v3
1 parent 71a55d8 commit ebe59ad

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 0148daa0588a857e7a844bae672f8265b3e3aef8
2+
refs/heads/master: ab8338fb5ad71d577f7c056087e2c81505f51eff

trunk/Makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ endif
198198

199199
STAGE$(1) := $$(Q)$$(call CFG_RUN_TARG,stage$(1), \
200200
$$(CFG_VALGRIND_COMPILE$(1)) stage$(1)/bin/rustc$$(X) \
201-
$$(CFG_RUSTC_FLAGS) --target=$(2))
201+
$$(CFG_RUSTC_FLAGS))
202202
endef
203203

204204
FUZZ := stage1/bin/fuzzer$(X)

trunk/mk/tests.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ CTEST_COMMON_ARGS$(2) := --compile-lib-path stage$(2)/lib \
189189
--run-lib-path stage$(2)/lib/$$(CFG_HOST_TRIPLE) \
190190
--rustc-path stage$(2)/bin/rustc$$(X) \
191191
--stage-id stage$(2) \
192-
--rustcflags "--target=$$(CFG_HOST_TRIPLE) $$(CFG_RUSTC_FLAGS)" \
192+
--rustcflags "$$(CFG_RUSTC_FLAGS)" \
193193
$$(CTEST_TESTARGS) \
194194

195195
CFAIL_ARGS$(2) := $$(CTEST_COMMON_ARGS$(2)) \

trunk/src/comp/driver/rustc.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,15 @@ fn build_target_config(sopts: @session::options) -> @session::config {
309309
}
310310
311311
fn host_triple() -> str {
312-
str::str_from_cstr(llvm::llvm::LLVMRustGetHostTriple())
312+
// Get the host triple out of the build environment. This ensures that our
313+
// idea of the host triple is the same as for the set of libraries we've
314+
// actually built. We can't just take LLVM's host triple because they
315+
// normalize all ix86 architectures to i386.
316+
// FIXME: Instead of grabbing the host triple we really should be
317+
// grabbing (at compile time) the target triple that this rustc is
318+
// built with and calling that (at runtime) the host triple.
319+
let ht = #env("CFG_HOST_TRIPLE");
320+
ret ht != "" ? ht : fail "rustc built without CFG_HOST_TRIPLE";
313321
}
314322

315323
fn build_session_options(binary: str, match: getopts::match)

0 commit comments

Comments
 (0)