Skip to content

Commit dcac427

Browse files
committed
Revert "build: Build libraries in the bin directory on win32"
This reverts commit 23e0d16.
1 parent 6becf51 commit dcac427

File tree

6 files changed

+17
-52
lines changed

6 files changed

+17
-52
lines changed

Makefile.in

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ export CFG_HOST_TRIPLE
262262
export CFG_LLVM_ROOT
263263
export CFG_ENABLE_MINGW_CROSS
264264
export CFG_PREFIX
265-
export CFG_LIBDIR
266265

267266
######################################################################
268267
# Subprograms
@@ -280,21 +279,12 @@ define SREQ
280279
# Destinations of artifacts for the host compiler
281280
HROOT$(1)_H_$(3) = $(3)/stage$(1)
282281
HBIN$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/bin
283-
# FIXME: Temporary hack for moving win32 libs to the bin directory
284-
ifeq ($(1),0)
285282
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/lib
286-
else
287-
HLIB$(1)_H_$(3) = $$(HROOT$(1)_H_$(3))/$$(CFG_LIBDIR)
288-
endif
289283

290284
# Destinations of artifacts for target architectures
291285
TROOT$(1)_T_$(2)_H_$(3) = $$(HLIB$(1)_H_$(3))/rustc/$(2)
292286
TBIN$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/bin
293-
ifeq ($(1),0)
294287
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/lib
295-
else
296-
TLIB$(1)_T_$(2)_H_$(3) = $$(TROOT$(1)_T_$(2)_H_$(3))/$$(CFG_LIBDIR)
297-
endif
298288

299289
# The name of the core and standard libraries used by rustc
300290
ifdef CFG_DISABLE_SHAREDSTD

configure

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -397,14 +397,6 @@ do
397397
done
398398
done
399399

400-
# On windows we just store the libraries in the bin directory because
401-
# there's no rpath
402-
CFG_LIBDIR=lib
403-
if [ "$CFG_OSTYPE" = "pc-mingw32" ]
404-
then
405-
CFG_LIBDIR=bin
406-
fi
407-
408400
for h in $CFG_TARGET_TRIPLES
409401
do
410402
for t in $CFG_TARGET_TRIPLES
@@ -415,19 +407,13 @@ do
415407
make_dir $h/stage$i/bin
416408

417409
# host lib dir
418-
make_dir $h/stage$i/$CFG_LIBDIR
419-
# FIXME: Transitional. remove
420-
make_dir $h/stage$i/lib
410+
make_dir $h/stage$i/lib
421411

422412
# target bin dir
423-
make_dir $h/stage$i/$CFG_LIBDIR/rustc/$t/bin
424-
# FIXME: Transitional. remove
425-
make_dir $h/stage$i/lib/rustc/$t/bin
413+
make_dir $h/stage$i/lib/rustc/$t/bin
426414

427415
# target lib dir
428-
make_dir $h/stage$i/$CFG_LIBDIR/rustc/$t/$CFG_LIBDIR
429-
# FIXME: Transitional. remove
430-
make_dir $h/stage$i/lib/rustc/$t/lib
416+
make_dir $h/stage$i/lib/rustc/$t/lib
431417
done
432418
done
433419

@@ -596,7 +582,6 @@ putvar CFG_HOST_TRIPLE
596582
putvar CFG_TARGET_TRIPLES
597583
putvar CFG_C_COMPILER
598584
putvar CFG_PREFIX
599-
putvar CFG_LIBDIR
600585

601586
# Setting this again because it may have been changed
602587
if [ $CFG_DISABLE_MANAGE_SUBMODULES ]

mk/platform.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ endif
108108

109109
CFG_TESTLIB=$(CFG_BUILD_DIR)/$(2)/$(strip \
110110
$(if $(findstring stage0,$(1)), \
111-
stage0/$(CFG_LIBDIR), \
111+
stage0/lib, \
112112
$(if $(findstring stage1,$(1)), \
113-
stage1/$(CFG_LIBDIR), \
113+
stage1/lib, \
114114
$(if $(findstring stage2,$(1)), \
115-
stage2/$(CFG_LIBDIR), \
115+
stage2/lib, \
116116
$(if $(findstring stage3,$(1)), \
117-
stage3/$(CFG_LIBDIR), \
118-
)))))/rustc/$(CFG_HOST_TRIPLE)/$(CFG_LIBDIR)
117+
stage3/lib, \
118+
)))))/rustc/$(CFG_HOST_TRIPLE)/lib
119119

120120
ifdef CFG_UNIXY
121121
CFG_INFO := $(info cfg: unix-y environment)

src/comp/back/rpath.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ fn minimize_rpaths(rpaths: [str]) -> [str] {
191191
#[cfg(target_os = "linux")]
192192
#[cfg(target_os = "macos")]
193193
#[cfg(target_os = "freebsd")]
194+
#[cfg(test)]
194195
mod test {
195196
#[test]
196197
fn test_rpaths_to_flags() {

src/comp/util/filesearch.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ export pick_file;
1616
export search;
1717
export relative_target_lib_path;
1818
export get_cargo_root;
19-
export libdir;
2019

2120
type pick<T> = block(path: fs::path) -> option::t<T>;
2221

@@ -81,7 +80,7 @@ fn search<T: copy>(filesearch: filesearch, pick: pick<T>) -> option::t<T> {
8180
}
8281

8382
fn relative_target_lib_path(target_triple: str) -> [fs::path] {
84-
[libdir(), "rustc", target_triple, libdir()]
83+
["lib", "rustc", target_triple, "lib"]
8584
}
8685

8786
fn make_target_lib_path(sysroot: fs::path,
@@ -122,16 +121,6 @@ fn get_cargo_root() -> result::t<fs::path, str> {
122121

123122
fn get_cargo_lib_path() -> result::t<fs::path, str> {
124123
result::chain(get_cargo_root()) { |p|
125-
result::ok(fs::connect(p, libdir()))
124+
result::ok(fs::connect(p, "lib"))
126125
}
127-
}
128-
129-
// The name of the directory rustc expects libraries to be located.
130-
// On Unix should be "lib", on windows "bin"
131-
fn libdir() -> str {
132-
let libdir = #env("CFG_LIBDIR");
133-
if str::is_empty(libdir) {
134-
fail "rustc compiled without CFG_LIBDIR environment variable";
135-
}
136-
libdir
137-
}
126+
}

src/etc/snapshot.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ def scrub(b):
2929
"lib/librustrt.dylib",
3030
"lib/librustllvm.dylib"],
3131
"winnt": ["bin/rustc.exe",
32-
"bin/core-*.dll",
33-
"bin/std-*.dll",
34-
"bin/rustc-*.dll",
35-
"bin/rustrt.dll",
36-
"bin/rustllvm.dll"],
32+
"lib/core-*.dll",
33+
"lib/std-*.dll",
34+
"lib/rustc-*.dll",
35+
"lib/rustrt.dll",
36+
"lib/rustllvm.dll"],
3737
"freebsd": ["bin/rustc",
3838
"lib/libcore-*.so",
3939
"lib/libstd-*.so",

0 commit comments

Comments
 (0)