File tree Expand file tree Collapse file tree 4 files changed +30
-0
lines changed
src/test/run-make-fulldeps/sanitizer-memory-build-core Expand file tree Collapse file tree 4 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ /Cargo.lock
2
+ /target /
Original file line number Diff line number Diff line change
1
+ [package ]
2
+ name = " foo"
3
+ version = " 0.1.0"
4
+ edition = " 2018"
5
+
6
+ [workspace ]
Original file line number Diff line number Diff line change
1
+ # needs-sanitizer-support
2
+ # needs-sanitizer-memory
3
+
4
+ # This test builds a trivial program with memory sanitizer
5
+ # and rebuilds part of the standard library
6
+
7
+ # -Clink-dead-code is a setting that sanitizer front-ends generally enable,
8
+ # due to issues with certain linkers mangling sections used to track
9
+ # coverage when trying to remove dead code
10
+ # Linking dead code allows tracking more regressions generating code for the
11
+ # standard library, eg for target features that are not currently enabled.
12
+
13
+ # -Ccodegen-units=1 is also enabled by the front-ends, to work around
14
+ # misoptimisations with ThinLTO.
15
+
16
+ all :
17
+ RUSTFLAGS=" -Cpasses=sancov -Clink-dead-code -Zsanitizer=memory -Ccodegen-units=1" \
18
+ cargo build --verbose --release -Zbuild-std=core --target $(TARGET )
19
+
Original file line number Diff line number Diff line change
1
+ fn main ( ) {
2
+ println ! ( "Hello, world!" ) ;
3
+ }
You can’t perform that action at this time.
0 commit comments