-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add basic support for function call #12
Conversation
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
For the test changes, I think we should try to mirror https://rustc-dev-guide.rust-lang.org/tests/directives.html. That is, the test should have something like: //@ run-pass
//@ exit-code: 1 Rather than a separate file |
Yeah, let me go over this testing process. |
Signed-off-by: xizheyin <[email protected]>
I have solved this. |
Thanks, I think we could make things a little more consistent still:
I don't think you need to worry about the The codegen changes here lgtm 👍 |
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
@tgross35 When type nju@njuyxz:~/rustc_codegen_c$ ./y test
[TEST] found 7 testcases
[TEST] TEST CompileLib auxiliary/mini_core
[TEST] TEST Compile examples/basic_math
[TEST] TEST file checking codegen/filename
[TEST] TEST file checking codegen/func_call
[TEST] TEST file checking codegen/params_count
[TEST] TEST file checking codegen/ret_value
[TEST] TEST Bless bless/basic_math While typing [TEST] TEST file checking codegen/func_call
source: tests/codegen/func_call.rs
output: build/tests/codegen/func_call
compile: CFLAGS=-Irust_runtime rustc --edition 2021 -Z codegen-backend=crates/target/debug/librustc_codegen_c.so -C panic=abort -C lto=false -Lall=build -lc -lrust_runtime --crate-type bin -O tests/codegen/func_call.rs -o build/tests/codegen/func_call
success
filecheck: "/usr/bin/FileCheck-18" "tests/codegen/func_call.rs"
success
directives: found 3 directives
running: build/tests/codegen/func_call
checking exit code: 1
exit code: passed
result: all checks passed
[TEST] TEST file checking codegen/params_count
source: tests/codegen/params_count.rs
output: build/tests/codegen/params_count
compile: CFLAGS=-Irust_runtime rustc --edition 2021 -Z codegen-backend=crates/target/debug/librustc_codegen_c.so -C panic=abort -C lto=false -Lall=build -lc -lrust_runtime --crate-type bin -O tests/codegen/params_count.rs -o build/tests/codegen/params_count
success
filecheck: "/usr/bin/FileCheck-18" "tests/codegen/params_count.rs"
success
directives: found 1 directives
result: all checks passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple small adjustments but mostly lgtm 👍
Signed-off-by: xizheyin <[email protected]>
Signed-off-by: xizheyin <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
//@ check-stdout: xxx
//@ exit-code: xxx
//@ check-stderr: xxx