Skip to content

Commit ddcd157

Browse files
authored
Merge branch 'master' into rusty-hermit
2 parents 8a11c61 + 57bfb80 commit ddcd157

File tree

230 files changed

+3542
-2746
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

230 files changed

+3542
-2746
lines changed

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
# This file should only ignore things that are generated during a build,
2-
# generated by common IDEs, and optional files controlled by the user
3-
# that affect the build (such as config.toml).
1+
# This file should only ignore things that are generated during a `x.py` build,
2+
# generated by common IDEs, and optional files controlled by the user that
3+
# affect the build (such as config.toml).
4+
# In particular, things like `mir_dump` should not be listed here; they are only
5+
# created during manual debugging and many people like to clean up instead of
6+
# having git ignore such leftovers. You can use `.git/info/exclude` to
7+
# configure your local ignore list.
48
# FIXME: This needs cleanup.
59
*~
610
.#*
@@ -52,3 +56,4 @@ config.stamp
5256
Session.vim
5357
.cargo
5458
no_llvm_build
59+
# Before adding new lines, see the comment at the top.

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@
2828
[submodule "src/doc/rust-by-example"]
2929
path = src/doc/rust-by-example
3030
url = https://github.com/rust-lang/rust-by-example.git
31-
[submodule "src/llvm-emscripten"]
32-
path = src/llvm-emscripten
33-
url = https://github.com/rust-lang/llvm.git
3431
[submodule "src/stdarch"]
3532
path = src/stdarch
3633
url = https://github.com/rust-lang/stdarch.git

Cargo.lock

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1724,9 +1724,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
17241724

17251725
[[package]]
17261726
name = "libc"
1727-
version = "0.2.62"
1727+
version = "0.2.64"
17281728
source = "registry+https://github.com/rust-lang/crates.io-index"
1729-
checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
1729+
checksum = "74dfca3d9957906e8d1e6a0b641dc9a59848e793f1da2165889fd4f62d10d79c"
17301730
dependencies = [
17311731
"rustc-std-workspace-core",
17321732
]
@@ -3567,6 +3567,7 @@ dependencies = [
35673567
"rustc_plugin_impl",
35683568
"rustc_privacy",
35693569
"rustc_resolve",
3570+
"rustc_target",
35703571
"rustc_traits",
35713572
"rustc_typeck",
35723573
"serialize",

config.toml.example

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,7 @@
374374

375375
# This is an array of the codegen backends that will be compiled for the rustc
376376
# that's being compiled. The default is to only build the LLVM codegen backend,
377-
# but you can also optionally enable the "emscripten" backend for asm.js or
378-
# make this an empty array (but that probably won't get too far in the
379-
# bootstrap)
380-
# FIXME: remove the obsolete emscripten backend option.
377+
# and currently the only standard option supported is `"llvm"`
381378
#codegen-backends = ["llvm"]
382379

383380
# This is the name of the directory in which codegen backends will get installed

src/bootstrap/bootstrap.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -734,10 +734,6 @@ def update_submodules(self):
734734
if module.endswith("llvm-project"):
735735
if self.get_toml('llvm-config') and self.get_toml('lld') != 'true':
736736
continue
737-
if module.endswith("llvm-emscripten"):
738-
backends = self.get_toml('codegen-backends')
739-
if backends is None or not 'emscripten' in backends:
740-
continue
741737
check = self.check_submodule(module, slow_submodules)
742738
filtered_submodules.append((module, check))
743739
submodules_names.append(module)

src/bootstrap/cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl Ord for Interned<String> {
161161
}
162162
}
163163

164-
struct TyIntern<T: Hash + Clone + Eq> {
164+
struct TyIntern<T: Clone + Eq> {
165165
items: Vec<T>,
166166
set: HashMap<T, Interned<T>>,
167167
}

src/bootstrap/compile.rs

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,6 @@ pub fn std_cargo(builder: &Builder<'_>,
210210
// config.toml equivalent) is used
211211
let llvm_config = builder.ensure(native::Llvm {
212212
target: builder.config.build,
213-
emscripten: false,
214213
});
215214
cargo.env("LLVM_CONFIG", llvm_config);
216215
cargo.env("RUSTC_BUILD_SANITIZERS", "1");
@@ -615,36 +614,27 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
615614
compiler: &Compiler,
616615
target: Interned<String>,
617616
backend: Interned<String>) -> String {
618-
let mut features = String::new();
619-
620617
match &*backend {
621-
"llvm" | "emscripten" => {
618+
"llvm" => {
622619
// Build LLVM for our target. This will implicitly build the
623620
// host LLVM if necessary.
624621
let llvm_config = builder.ensure(native::Llvm {
625622
target,
626-
emscripten: backend == "emscripten",
627623
});
628624

629-
if backend == "emscripten" {
630-
features.push_str(" emscripten");
631-
}
632-
633625
builder.info(&format!("Building stage{} codegen artifacts ({} -> {}, {})",
634626
compiler.stage, &compiler.host, target, backend));
635627

636628
// Pass down configuration from the LLVM build into the build of
637629
// librustc_llvm and librustc_codegen_llvm.
638-
if builder.is_rust_llvm(target) && backend != "emscripten" {
630+
if builder.is_rust_llvm(target) {
639631
cargo.env("LLVM_RUSTLLVM", "1");
640632
}
641633

642634
cargo.env("LLVM_CONFIG", &llvm_config);
643-
if backend != "emscripten" {
644-
let target_config = builder.config.target_config.get(&target);
645-
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
646-
cargo.env("CFG_LLVM_ROOT", s);
647-
}
635+
let target_config = builder.config.target_config.get(&target);
636+
if let Some(s) = target_config.and_then(|c| c.llvm_config.as_ref()) {
637+
cargo.env("CFG_LLVM_ROOT", s);
648638
}
649639
// Some LLVM linker flags (-L and -l) may be needed to link librustc_llvm.
650640
if let Some(ref s) = builder.config.llvm_ldflags {
@@ -662,9 +652,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
662652
"libstdc++.a");
663653
cargo.env("LLVM_STATIC_STDCPP", file);
664654
}
665-
if builder.config.llvm_link_shared ||
666-
(builder.config.llvm_thin_lto && backend != "emscripten")
667-
{
655+
if builder.config.llvm_link_shared || builder.config.llvm_thin_lto {
668656
cargo.env("LLVM_LINK_SHARED", "1");
669657
}
670658
if builder.config.llvm_use_libcxx {
@@ -676,8 +664,7 @@ pub fn build_codegen_backend(builder: &Builder<'_>,
676664
}
677665
_ => panic!("unknown backend: {}", backend),
678666
}
679-
680-
features
667+
String::new()
681668
}
682669

683670
/// Creates the `codegen-backends` folder for a compiler that's about to be

src/bootstrap/config.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ impl Config {
668668

669669
pub fn llvm_enabled(&self) -> bool {
670670
self.rust_codegen_backends.contains(&INTERNER.intern_str("llvm"))
671-
|| self.rust_codegen_backends.contains(&INTERNER.intern_str("emscripten"))
672671
}
673672
}
674673

src/bootstrap/configure.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def v(*args):
5555
o("dist-src", "rust.dist-src", "when building tarballs enables building a source tarball")
5656
o("cargo-native-static", "build.cargo-native-static", "static native libraries in cargo")
5757
o("profiler", "build.profiler", "build the profiler runtime")
58-
o("emscripten", None, "compile the emscripten backend as well as LLVM")
5958
o("full-tools", None, "enable all tools")
6059
o("lld", "rust.lld", "build lld")
6160
o("lldb", "rust.lldb", "build lldb")
@@ -335,10 +334,8 @@ def set(key, value):
335334
set('build.host', value.split(','))
336335
elif option.name == 'target':
337336
set('build.target', value.split(','))
338-
elif option.name == 'emscripten':
339-
set('rust.codegen-backends', ['llvm', 'emscripten'])
340337
elif option.name == 'full-tools':
341-
set('rust.codegen-backends', ['llvm', 'emscripten'])
338+
set('rust.codegen-backends', ['llvm'])
342339
set('rust.lld', True)
343340
set('rust.llvm-tools', True)
344341
set('build.extended', True)

src/bootstrap/dist.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -826,17 +826,13 @@ fn copy_src_dirs(builder: &Builder<'_>, src_dirs: &[&str], exclude_dirs: &[&str]
826826

827827
const LLVM_TEST: &[&str] = &[
828828
"llvm-project/llvm/test", "llvm-project\\llvm\\test",
829-
"llvm-emscripten/test", "llvm-emscripten\\test",
830829
];
831830
if LLVM_TEST.iter().any(|path| spath.contains(path)) &&
832831
(spath.ends_with(".ll") ||
833832
spath.ends_with(".td") ||
834833
spath.ends_with(".s")) {
835834
return false
836835
}
837-
if spath.contains("test/emscripten") || spath.contains("test\\emscripten") {
838-
return false
839-
}
840836

841837
let full_path = Path::new(dir).join(path);
842838
if exclude_dirs.iter().any(|excl| full_path == Path::new(excl)) {

0 commit comments

Comments
 (0)