Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d7918fb
Implements RFC 1937: `?` in `main`
bkchr Dec 3, 2017
b452c43
avoid ICE when fields are not laid out in order
nikomatsakis Dec 5, 2017
19adeaa
convert print-type-sizes to use `start` instead of `main`
nikomatsakis Dec 5, 2017
011c9ea
Fixes compile bug caused by upstream changes
bkchr Dec 5, 2017
99a108c
Fixes compilation errors and adds proposed improvements
bkchr Dec 21, 2017
f842f75
Fixes tests
bkchr Dec 21, 2017
8232734
Fall back to main -> () when termination trait language item is not e…
bkchr Dec 21, 2017
267800a
New generated main returns void
bkchr Dec 21, 2017
8f539b0
Fixes codegen-units tests
bkchr Dec 21, 2017
c7a57d2
Adds termination_trait feature gate
bkchr Dec 22, 2017
a8a9a05
Convert codegen-unit tests to use `start` instead of `main`
bkchr Dec 22, 2017
83cb299
Just compare the symbol names and types, not the addresses
bkchr Dec 22, 2017
88bf2b4
Removes some obscure transmute call in `lang_start`
bkchr Dec 22, 2017
347165f
The test functions are now in the same compile unit
bkchr Dec 22, 2017
faff382
Don't emit the termination lang item in tests
bkchr Dec 22, 2017
072f3eb
Use move for optimization purposes
bkchr Dec 22, 2017
7efeeba
Use `start` for the `sepcomp-inlining` test
bkchr Dec 22, 2017
f972f52
Revert "Just compare the symbol names and types, not the addresses"
bkchr Dec 22, 2017
dbbba55
Rework the exit failure and success declaration for wasm32
bkchr Dec 22, 2017
c2f22f0
Adds whitespace
bkchr Dec 23, 2017
7dfec34
Split `lang_start` in two functions to reduce generated code
bkchr Dec 23, 2017
81e375d
Change name of `lang_start_real` to `lang_start_internal`
bkchr Dec 23, 2017
2cdd1c4
rustc: Switch `start_fn` to hidden visibility
alexcrichton Dec 26, 2017
5a4298b
Don't use `process::exit` as it is an `unreachable` on wasm32
bkchr Dec 26, 2017
09f94be
Revert "New generated main returns void"
bkchr Dec 27, 2017
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use start for the sepcomp-inlining test
  • Loading branch information
bkchr committed Dec 26, 2017
commit 7efeeba13a2ca862f8d0f6e1f0f6fd936478b78f
4 changes: 2 additions & 2 deletions src/test/run-make/sepcomp-inlining/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ all:
$(RUSTC) foo.rs --emit=llvm-ir -C codegen-units=3 \
Copy link
Contributor

@arielb1 arielb1 Dec 22, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might break the point of the test. Could you use #[start] here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I compared the output of the test between my version and a version compiled with rust nightly. I think the unwinding stuff by the new lang_start moves a lot of stuff in the codegen untis around. But if you have a better idea, I'm open :)

-Z inline-in-all-cgus
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ i32\ .*inlined)" -eq "0" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ internal\ i32\ .*inlined)" -eq "2" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c define\ hidden\ i32\ .*normal)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "1" ]
[ "$$(cat "$(TMPDIR)"/foo.*.ll | grep -c declare\ hidden\ i32\ .*normal)" -eq "2" ]
7 changes: 6 additions & 1 deletion src/test/run-make/sepcomp-inlining/foo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![feature(start)]

#[inline]
fn inlined() -> u32 {
1234
Expand All @@ -29,7 +31,10 @@ mod b {
}
}

fn main() {
#[start]
fn start(_: isize, _: *const *const u8) -> isize {
a::f();
b::f();

0
}