File tree 7 files changed +62
-33
lines changed
7 files changed +62
-33
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,17 @@ run-make/link-framework/Makefile
56
56
run-make/linkage-attr-on-static/Makefile
57
57
run-make/long-linker-command-lines-cmd-exe/Makefile
58
58
run-make/long-linker-command-lines/Makefile
59
- run-make/lto-linkage-used-attr/Makefile
60
59
run-make/lto-no-link-whole-rlib/Makefile
61
60
run-make/macos-deployment-target/Makefile
62
61
run-make/min-global-align/Makefile
63
62
run-make/native-link-modifier-bundle/Makefile
64
63
run-make/native-link-modifier-whole-archive/Makefile
65
64
run-make/no-alloc-shim/Makefile
66
65
run-make/no-builtins-attribute/Makefile
67
- run-make/no-duplicate-libs/Makefile
68
66
run-make/panic-abort-eh_frame/Makefile
69
67
run-make/pass-non-c-like-enum-to-c/Makefile
70
68
run-make/pdb-buildinfo-cl-cmd/Makefile
71
69
run-make/pgo-gen-lto/Makefile
72
- run-make/pgo-gen-no-imp-symbols/Makefile
73
70
run-make/pgo-indirect-call-promotion/Makefile
74
71
run-make/pointer-auth-link-with-c/Makefile
75
72
run-make/print-calling-conventions/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Link time optimizations (LTO) used to snip away some important symbols
2
+ // when setting optimization level to 3 or higher.
3
+ // This is an LLVM, not a rustc bug, fixed here: https://reviews.llvm.org/D145293
4
+ // This test checks that the impl_* symbols are preserved as they should.
5
+ // See https://github.com/rust-lang/rust/issues/108030
6
+
7
+ //FIXME(Oneirical): try it on more than only-x86_64-unknown-linux-gnu
8
+
9
+ use run_make_support::rustc;
10
+
11
+ fn main() {
12
+ rustc().arg("-Cdebuginfo=0").opt_level("3").input("lib.rs").run();
13
+ rustc().arg("-Clto=fat").arg("-Cdebuginfo=0").opt_level("3").input("main.rs").run();
14
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // The rust compiler used to try to detect duplicated libraries in
2
+ // the linking order and remove the duplicates... but certain edge cases,
3
+ // such as the one presented in `foo` and `bar` in this test, demand precise
4
+ // control over the link order, including duplicates. As the anti-duplication
5
+ // filter was removed, this test should now successfully see main be compiled
6
+ // and executed.
7
+ // See https://github.com/rust-lang/rust/pull/12688
8
+
9
+ //@ ignore-cross-compile
10
+ // Reason: the compiled binary is executed
11
+
12
+ // FIXME(Oneirical): try on msvc because of #27979
13
+
14
+ use run_make_support::{build_native_static_lib, run, rustc};
15
+
16
+ fn main() {
17
+ build_native_static_lib("foo");
18
+ build_native_static_lib("bar");
19
+ rustc().input("main.rs").run();
20
+ run("main");
21
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // LLVM's profiling instrumentation adds a few symbols that are used by the profiler runtime.
2
+ // Since these show up as globals in the LLVM IR, the compiler generates dllimport-related
3
+ // __imp_ stubs for them. This can lead to linker errors because the instrumentation
4
+ // symbols have weak linkage or are in a comdat section, but the __imp_ stubs aren't.
5
+ // Since profiler-related symbols were excluded from stub-generation in #59812, this has
6
+ // been fixed, and this test checks that the llvm profile symbol appear, but without the
7
+ // anomalous __imp_ stubs.
8
+ // See https://github.com/rust-lang/rust/pull/59812
9
+
10
+ use run_make_support::{cwd, rfs, rustc};
11
+
12
+ fn main() {
13
+ rustc()
14
+ .input("test.rs")
15
+ .emit("llvm-ir")
16
+ .opt()
17
+ .codegen_units(1)
18
+ .profile_generate(cwd())
19
+ .arg("-Zno-profiler-runtime")
20
+ .run();
21
+ let out = rfs::read_to_string("test.ll");
22
+ // We expect symbols starting with "__llvm_profile_".
23
+ assert!(out.contains("__llvm_profile_"));
24
+ // We do NOT expect the "__imp_" version of these symbols.
25
+ assert!(!out.contains("__imp___llvm_profile_")); // 64 bit
26
+ assert!(!out.contains("__imp____llvm_profile_")); // 32 bit
27
+ }
You can’t perform that action at this time.
0 commit comments