Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #73498

Merged
merged 47 commits into from
Jun 19, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift click to select a range
730f736
Fix asinh of negative values
Ralith May 23, 2020
f7d745f
tag/niche terminology cleanup
RalfJung May 23, 2020
7a6d03c
miri errors: rename InvalidDiscriminant -> InvalidTag
RalfJung May 30, 2020
20abc70
Don't intern memory in const prop.
oli-obk Jun 3, 2020
1e88f13
Stop allowing `Indirect(..)` values to be propagated
wesleywiser Jun 8, 2020
9ceb9bb
Move copying of self-contained objects to new function
mati865 Jun 2, 2020
638ebbc
Move copying of MinGW CRT to the better location
mati865 Jun 2, 2020
961974f
Use enum to distinguish dependency type
mati865 Jun 2, 2020
5d29883
Move some libs to self-contained directory
mati865 Jun 11, 2020
e9ac01a
Get self-contained directory path via dedicated function
mati865 Jun 8, 2020
43905cd
Move shipped MinGW linker to self-contained dir
mati865 Jun 8, 2020
d5ea0e9
Report error when casting an C-like enum implementing Drop
oddg May 15, 2020
e32db84
Add rust features to print target features
aszenz Jun 14, 2020
a40156e
UI test for deprecation warning of casting enum implementing Drop
oddg Jun 14, 2020
0906066
Test that bounds checks are elided when slice len is checked up-front
erikdesjardins Jun 15, 2020
d3ca6fd
Enable static-pie for the x86_64-unknown-linux-musl target
haraldh Jun 15, 2020
b5809b0
Update src/librustc_typeck/check/cast.rs
nikomatsakis Jun 15, 2020
10c8d2a
add FIXME to EnumTagInfo
RalfJung Jun 15, 2020
e0975b9
elaborate, add check for exact bounds
erikdesjardins Jun 15, 2020
f3dfe80
Adjust error message
oddg Jun 16, 2020
1990f97
Disallow loading crates with non-ascii identifier name.
crlf0710 Jun 13, 2020
4506a35
add header for rust specific feature
aszenz Jun 16, 2020
9f50f84
break long line for formatting
aszenz Jun 16, 2020
457acbd
trim whitespace
aszenz Jun 16, 2020
caffb28
add blank line bw sections
aszenz Jun 17, 2020
6351850
ignore-debug: debug assertions in slice indexing prevent the optimiza…
erikdesjardins Jun 17, 2020
a7c2cf8
Reduce pointer casts in Box::into_boxed_slice
cuviper Jun 17, 2020
d134870
Document format correction
qy3u Jun 18, 2020
abb5800
Ensure std benchmarks get tested.
ehuss Jun 8, 2020
8aecafe
Fix liballoc doc spelling
pickfire Jun 18, 2020
ec8ff1c
Liballoc clean up macro_rules style
pickfire Jun 18, 2020
111c2d2
Rearrange liballoc __impl_slice_eq1
pickfire Jun 18, 2020
5a9ff05
Disable core benches on wasm (benches not supported).
ehuss Jun 18, 2020
35a2915
Remove now-redundant branch
Ralith Jun 19, 2020
27d4737
Rollup merge of #70740 - haraldh:static-pie, r=petrochenkov
RalfJung Jun 19, 2020
9c54c65
Rollup merge of #72331 - oddg:forbid-cast-of-cenum-implementing-drop,…
RalfJung Jun 19, 2020
99be102
Rollup merge of #72486 - Ralith:asinh-fix, r=dtolnay
RalfJung Jun 19, 2020
5e7eec2
Rollup merge of #72497 - RalfJung:tag-term, r=oli-obk
RalfJung Jun 19, 2020
ea3c309
Rollup merge of #72999 - mati865:separate-self-contained-dir, r=Mark-…
RalfJung Jun 19, 2020
098949b
Rollup merge of #73130 - wesleywiser:remove_const_prop_for_indirects,…
RalfJung Jun 19, 2020
78f3e9c
Rollup merge of #73142 - ehuss:std-benches, r=dtolnay
RalfJung Jun 19, 2020
3b4bec2
Rollup merge of #73305 - crlf0710:disallow_loading_monsters, r=petroc…
RalfJung Jun 19, 2020
8d79ebd
Rollup merge of #73346 - aszenz:patch-1, r=cuviper
RalfJung Jun 19, 2020
7d3238f
Rollup merge of #73362 - erikdesjardins:bounds, r=nikomatsakis
RalfJung Jun 19, 2020
fc2ce7c
Rollup merge of #73459 - cuviper:into_boxed_slice-unicast, r=dtolnay
RalfJung Jun 19, 2020
f7d833e
Rollup merge of #73464 - qy3u:fs-document-format-correction, r=jonas-…
RalfJung Jun 19, 2020
028c908
Rollup merge of #73479 - pickfire:liballoc-spell, r=dtolnay
RalfJung Jun 19, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move some libs to self-contained directory
  • Loading branch information
mati865 committed Jun 11, 2020
commit 5d298836f2254144f80e56ee37af44ac79f3eb2c
24 changes: 17 additions & 7 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 172,14 @@ fn copy_self_contained_objects(
compiler: &Compiler,
target: Interned<String>,
) -> Vec<(PathBuf, DependencyType)> {
let libdir = builder.sysroot_libdir(*compiler, target);
// cfg(bootstrap)
// Remove when upgrading bootstrap compiler.
let libdir_self_contained = if compiler.stage == 0 {
builder.sysroot_libdir(*compiler, target).to_path_buf()
} else {
builder.sysroot_libdir(*compiler, target).join("self-contained")
};
t!(fs::create_dir_all(&libdir_self_contained));
let mut target_deps = vec![];

// Copies the CRT objects.
Expand Down Expand Up @@ -207,7 214,7 @@ fn copy_self_contained_objects(
} else if target.contains("windows-gnu") {
for obj in ["crt2.o", "dllcrt2.o"].iter() {
let src = compiler_file(builder, builder.cc(target), target, obj);
let target = libdir.join(obj);
let target = libdir_self_contained.join(obj);
builder.copy(&src, &target);
target_deps.push((target, DependencyType::TargetSelfContained));
}
Expand Down Expand Up @@ -844,14 851,17 @@ pub fn add_to_sysroot(
sysroot_host_dst: &Path,
stamp: &Path,
) {
let self_contained_dst = &sysroot_dst.join("self-contained");
t!(fs::create_dir_all(&sysroot_dst));
t!(fs::create_dir_all(&sysroot_host_dst));
t!(fs::create_dir_all(&self_contained_dst));
for (path, dependency_type) in builder.read_stamp_file(stamp) {
if dependency_type == DependencyType::Host {
builder.copy(&path, &sysroot_host_dst.join(path.file_name().unwrap()));
} else {
builder.copy(&path, &sysroot_dst.join(path.file_name().unwrap()));
}
let dst = match dependency_type {
DependencyType::Host => sysroot_host_dst,
DependencyType::Target => sysroot_dst,
DependencyType::TargetSelfContained => self_contained_dst,
};
builder.copy(&path, &dst.join(path.file_name().unwrap()));
}
}

Expand Down
13 changes: 11 additions & 2 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 321,12 @@ fn make_win_dist(
);

//Copy platform libs to platform-specific lib directory
let target_lib_dir = plat_root.join("lib").join("rustlib").join(target_triple).join("lib");
let target_lib_dir = plat_root
.join("lib")
.join("rustlib")
.join(target_triple)
.join("lib")
.join("self-contained");
fs::create_dir_all(&target_lib_dir).expect("creating target_lib_dir failed");
for src in target_libs {
builder.copy_to_folder(&src, &target_lib_dir);
Expand Down Expand Up @@ -650,9 655,13 @@ fn skip_host_target_lib(builder: &Builder<'_>, compiler: Compiler) -> bool {
/// Copy stamped files into an image's `target/lib` directory.
fn copy_target_libs(builder: &Builder<'_>, target: &str, image: &Path, stamp: &Path) {
let dst = image.join("lib/rustlib").join(target).join("lib");
let self_contained_dst = dst.join("self-contained");
t!(fs::create_dir_all(&dst));
t!(fs::create_dir_all(&self_contained_dst));
for (path, dependency_type) in builder.read_stamp_file(stamp) {
if dependency_type != DependencyType::Host || builder.config.build == target {
if dependency_type == DependencyType::TargetSelfContained {
builder.copy(&path, &self_contained_dst.join(path.file_name().unwrap()));
} else if dependency_type == DependencyType::Target || builder.config.build == target {
builder.copy(&path, &dst.join(path.file_name().unwrap()));
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/librustc_codegen_ssa/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 1075,10 @@ fn get_object_file_path(sess: &Session, name: &str) -> PathBuf {
if file_path.exists() {
return file_path;
}
let file_path = fs.get_lib_path().join("self-contained").join(name);
if file_path.exists() {
return file_path;
}
for search_path in fs.search_paths() {
let file_path = search_path.dir.join(name);
if file_path.exists() {
Expand Down Expand Up @@ -1470,6 1474,9 @@ fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session) {
// The location of crates will be determined as needed.
let lib_path = sess.target_filesearch(PathKind::All).get_lib_path();
cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));

let lib_path = sess.target_filesearch(PathKind::All).get_lib_path().join("self-contained");
cmd.include_path(&fix_windows_verbatim_for_gcc(&lib_path));
}

/// Add options making relocation sections in the produced ELF files read-only
Expand Down