rust-1.38.0
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
From 2bf05f208272cd58c57f4d7d8d0e10fdb22e8719 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 27 Sep 2019 12:33:08 -0700
|
||||
Subject: [PATCH] [WIP] minimize the rust-std component
|
||||
|
||||
---
|
||||
src/bootstrap/dist.rs | 45 +++++++++++++++----------------------------
|
||||
1 file changed, 16 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
|
||||
index 552965863d10..76fbd07f9fb5 100644
|
||||
--- a/src/bootstrap/dist.rs
|
||||
+++ b/src/bootstrap/dist.rs
|
||||
@@ -667,41 +667,28 @@ impl Step for Std {
|
||||
return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
|
||||
}
|
||||
|
||||
- // We want to package up as many target libraries as possible
|
||||
- // for the `rust-std` package, so if this is a host target we
|
||||
- // depend on librustc and otherwise we just depend on libtest.
|
||||
- if builder.hosts.iter().any(|t| t == target) {
|
||||
- builder.ensure(compile::Rustc { compiler, target });
|
||||
- } else {
|
||||
- if builder.no_std(target) == Some(true) {
|
||||
- // the `test` doesn't compile for no-std targets
|
||||
- builder.ensure(compile::Std { compiler, target });
|
||||
- } else {
|
||||
- builder.ensure(compile::Test { compiler, target });
|
||||
- }
|
||||
- }
|
||||
+ builder.ensure(compile::Std { compiler, target });
|
||||
+ builder.ensure(compile::Test { compiler, target });
|
||||
|
||||
let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
|
||||
let _ = fs::remove_dir_all(&image);
|
||||
|
||||
- let dst = image.join("lib/rustlib").join(target);
|
||||
+ let dst = image.join("lib/rustlib").join(target).join("lib");
|
||||
t!(fs::create_dir_all(&dst));
|
||||
- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf();
|
||||
- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir
|
||||
- builder.cp_filtered(&src, &dst, &|path| {
|
||||
- if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
|
||||
- if name == builder.config.rust_codegen_backends_dir.as_str() {
|
||||
- return false
|
||||
- }
|
||||
- if name == "bin" {
|
||||
- return false
|
||||
- }
|
||||
- if name.contains("LLVM") {
|
||||
- return false
|
||||
- }
|
||||
+
|
||||
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
|
||||
+ let stamp = dbg!(compile::libstd_stamp(builder, compiler_to_use, target));
|
||||
+ for (path, host) in builder.read_stamp_file(&stamp) {
|
||||
+ if !host {
|
||||
+ builder.copy(&path, &dst.join(path.file_name().unwrap()));
|
||||
}
|
||||
- true
|
||||
- });
|
||||
+ }
|
||||
+ let stamp = dbg!(compile::libtest_stamp(builder, compiler_to_use, target));
|
||||
+ for (path, host) in builder.read_stamp_file(&stamp) {
|
||||
+ if !host {
|
||||
+ builder.copy(&path, &dst.join(path.file_name().unwrap()));
|
||||
+ }
|
||||
+ }
|
||||
|
||||
let mut cmd = rust_installer(builder);
|
||||
cmd.arg("generate")
|
||||
--
|
||||
2.21.0
|
||||
|
||||
-32
@@ -1,32 +0,0 @@
|
||||
From 5dbc650a60ddb230f59e5a18ffd298b033566945 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Johannes=20L=C3=B6thberg?= <johannes@kyriasis.com>
|
||||
Date: Thu, 20 Jul 2017 23:07:01 +0200
|
||||
Subject: [PATCH] librustc_llvm/build: Force link against libffi
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
`llvm-config --libs` doesn't output libffi in many cases. Fixing it
|
||||
turned out to take quite a bit of effort, so force libffi linking in
|
||||
here for now.
|
||||
|
||||
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
|
||||
---
|
||||
src/librustc_llvm/build.rs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs
|
||||
index 3f0f536960..7dc0c40c9d 100644
|
||||
--- a/src/librustc_llvm/build.rs
|
||||
+++ b/src/librustc_llvm/build.rs
|
||||
@@ -220,6 +220,7 @@ fn main() {
|
||||
};
|
||||
println!("cargo:rustc-link-lib={}={}", kind, name);
|
||||
}
|
||||
+ println!("cargo:rustc-link-lib=dylib=ffi");
|
||||
|
||||
// LLVM ldflags
|
||||
//
|
||||
--
|
||||
2.13.3
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
|
||||
index e54c9360baec..9e4cd5ebca74 100644
|
||||
--- a/src/bootstrap/builder.rs
|
||||
+++ b/src/bootstrap/builder.rs
|
||||
@@ -145,7 +145,7 @@ impl StepDescription {
|
||||
only_hosts: S::ONLY_HOSTS,
|
||||
should_run: S::should_run,
|
||||
make_run: S::make_run,
|
||||
- name: unsafe { ::std::intrinsics::type_name::<S>() },
|
||||
+ name: std::any::type_name::<S>(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,9 @@ sanitizers = false
|
||||
prefix = "/usr"
|
||||
|
||||
[rust]
|
||||
codegen-units = 1
|
||||
codegen-units-std = 1
|
||||
|
||||
debuginfo = true
|
||||
debuginfo-lines = true
|
||||
debuginfo-level = 2
|
||||
|
||||
channel = "stable"
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<IsA>app</IsA>
|
||||
<Summary>Systems programming language focused on safety, speed and concurrency</Summary>
|
||||
<Description>Systems programming language focused on safety, speed and concurrency</Description>
|
||||
<Archive sha1sum="f57561cd9fe8a972d3c4f34a87352c6779fc4916" type="targz">https://static.rust-lang.org/dist/rustc-1.35.0-src.tar.gz</Archive>
|
||||
<Archive sha1sum="6ad0f778882c73a689c88e1ecdaab8e7b9ceb27b" type="targz">https://static.rust-lang.org/dist/rustc-1.38.0-src.tar.gz</Archive>
|
||||
<AdditionalFiles>
|
||||
<AdditionalFile target="config.toml">bootstrap-config.toml</AdditionalFile>
|
||||
</AdditionalFiles>
|
||||
@@ -34,7 +34,8 @@
|
||||
<Dependency>libffi-devel</Dependency>
|
||||
</BuildDependencies>
|
||||
<Patches>
|
||||
<!-- <Patch>0001-librustc_llvm-build-Force-link-against-libffi.patch</Patch> -->
|
||||
<Patch level="1">bootstrap-1.38.patch</Patch>
|
||||
<Patch level="1">0001-WIP-minimize-the-rust-std-component.patch</Patch>
|
||||
</Patches>
|
||||
|
||||
</Source>
|
||||
@@ -64,6 +65,13 @@
|
||||
</Package>
|
||||
|
||||
<History>
|
||||
<Update release="12">
|
||||
<Date>2019-10-21</Date>
|
||||
<Version>1.38.0</Version>
|
||||
<Comment>Version bump.</Comment>
|
||||
<Name>Mustafa Cinasal</Name>
|
||||
<Email>muscnsl@gmail.com</Email>
|
||||
</Update>
|
||||
<Update release="11">
|
||||
<Date>2019-05-29</Date>
|
||||
<Version>1.35.0</Version>
|
||||
|
||||
Reference in New Issue
Block a user