Skip to content

Commit 75ee1d7

Browse files
committed
rewrite relocation-model to rmake
1 parent 5c8459f commit 75ee1d7

File tree

3 files changed

+26
-21
lines changed

3 files changed

+26
-21
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,6 @@ run-make/raw-dylib-inline-cross-dylib/Makefile
164164
run-make/raw-dylib-link-ordinal/Makefile
165165
run-make/raw-dylib-stdcall-ordinal/Makefile
166166
run-make/redundant-libs/Makefile
167-
run-make/relocation-model/Makefile
168167
run-make/relro-levels/Makefile
169168
run-make/remap-path-prefix-dwarf/Makefile
170169
run-make/remap-path-prefix/Makefile

tests/run-make/relocation-model/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Generation of position-independent code (PIC) can be altered
2+
// through use of the -C relocation-model rustc flag. This test
3+
// uses varied values with this flag and checks that compilation
4+
// succeeds.
5+
// See https://github.com/rust-lang/rust/pull/13340
6+
7+
//@ ignore-cross-compile
8+
9+
use run_make_support::{run, rustc};
10+
11+
fn main() {
12+
// FIXME(Oneirical): This first one will likely fail on MSVC due to #28026.
13+
// Remove this after try-job
14+
rustc().arg("-Crelocation-model=static").input("foo.rs").run();
15+
run("foo");
16+
rustc().arg("-Crelocation-model=dynamic-no-pic").input("foo.rs").run();
17+
run("foo");
18+
rustc().arg("-Crelocation-model=default").input("foo.rs").run();
19+
run("foo");
20+
rustc()
21+
.arg("-Crelocation-model=dynamic-no-pic")
22+
.crate_type("dylib")
23+
.emit("link,obj")
24+
.input("foo.rs")
25+
.run();
26+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy