Skip to content

Commit 5c53617

Browse files
committed
rollup merge of rust-lang#19161: jmesmon/mk-fixes
This is a collection of misc issues I've run into while adding bindir & libdir support that aren't really bindir & libdir specific. While I continue to fiddle with bindir and libdir bugs, I figured these might be useful for others to have merged.
2 parents 6114db3 + 12749fc commit 5c53617

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

configure

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -711,11 +711,6 @@ then
711711
fi
712712
step_msg "using rustc at: ${CFG_LOCAL_RUST_ROOT} with version: $LRV"
713713
putvar CFG_LOCAL_RUST_ROOT
714-
else
715-
if [ ! -z "$CFG_LOCAL_RUST_ROOT" ]
716-
then
717-
warn "Use of --local-rust-root without --enable-local-rust"
718-
fi
719714
fi
720715

721716
# Force freebsd to build with clang; gcc doesn't like us there

mk/main.mk

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,14 @@ endif
190190
# Target-and-rule "utility variables"
191191
######################################################################
192192

193-
define DEF_X
193+
define DEF_FOR_TARGET
194194
X_$(1) := $(CFG_EXE_SUFFIX_$(1))
195+
ifndef CFG_LLVM_TARGET_$(1)
196+
CFG_LLVM_TARGET_$(1) := $(1)
197+
endif
195198
endef
196199
$(foreach target,$(CFG_TARGET), \
197-
$(eval $(call DEF_X,$(target))))
200+
$(eval $(call DEF_FOR_TARGET,$(target))))
198201

199202
# "Source" files we generate in builddir along the way.
200203
GENERATED :=

mk/rt.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
7575
@mkdir -p $$(@D)
7676
@$$(call E, compile: $$@)
7777
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
78-
-filetype=obj -mtriple=$(1) -relocation-model=pic -o $$@ $$<
78+
-filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) -relocation-model=pic -o $$@ $$<
7979

8080
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
8181
@mkdir -p $$(@D)

mk/stage0.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ifdef CFG_ENABLE_LOCAL_RUST
2222
else
2323
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
2424
endif
25-
$(Q)touch $@
25+
$(Q)if [ -e "$@" ]; then touch "$@"; else echo "ERROR: snapshot $@ not found"; exit 1; fi
2626

2727
# For other targets, let the host build the target:
2828

mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/$(4)$$(X_$(2)): \
116116
$$(foreach dep,$$(TOOL_DEPS_$(4)), \
117117
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
118118
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
119-
| $$(TBIN$(1)_T_$(4)_H_$(3))/
119+
| $$(TBIN$(1)_T_$(2)_H_$(3))/
120120
@$$(call E, rustc: $$@)
121121
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --cfg $(4)
122122

src/librustdoc/core.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use rustc_trans::back::link;
1818
use syntax::{ast, ast_map, codemap, diagnostic};
1919

2020
use std::cell::RefCell;
21-
use std::os;
2221
use std::collections::{HashMap, HashSet};
2322
use arena::TypedArena;
2423

@@ -89,7 +88,7 @@ pub fn run_core(libs: Vec<Path>, cfgs: Vec<String>, externs: Externs,
8988
let warning_lint = lint::builtin::WARNINGS.name_lower();
9089

9190
let sessopts = config::Options {
92-
maybe_sysroot: Some(os::self_exe_path().unwrap().dir_path()),
91+
maybe_sysroot: None,
9392
addl_lib_search_paths: RefCell::new(libs),
9493
crate_types: vec!(config::CrateTypeRlib),
9594
lint_opts: vec!((warning_lint, lint::Allow)),

0 commit comments

Comments
 (0)