-
Notifications
You must be signed in to change notification settings - Fork 13.7k
compiler: Apply target features to the entry function #146144
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
Conversation
rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.
Use r?
to explicitly pick a reviewer
Some changes occurred in compiler/rustc_codegen_gcc
Some changes occurred in compiler/rustc_codegen_ssa
This comment has been minimized.
This comment has been minimized.
04f812b
to
f964331
Compare
f964331
to
beb0304
Compare
Link: rust-lang/rust#146144 Signed-off-by: Ilikara <3435193369@qq.com>
beb0304
to
7f26036
Compare
This comment was marked as resolved.
This comment was marked as resolved.
7f26036
to
f028b9b
Compare
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed.
Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.
r=me with the nit #146144 (comment) addressed.
@rustbot author
Reminder, once the PR becomes ready for a review, use @rustbot ready
.
f028b9b
to
923b892
Compare
AirFortressIlikara
commented
Sep 4, 2025
We compile oma with flags below to avoid lsx:
[DEBUG]: LDFLAGS=-Wl,-O1,--sort-common,--as-needed -Wl,-build-id=sha1 -Wl,-z,relro -Wl,-z,now -fPIC -fPIE -flto -fuse-linker-plugin
[DEBUG]: CFLAGS=-pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -fPIC -fPIC -ggdb -O2 -fno-omit-frame-pointer -flto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
[DEBUG]: CPPFLAGS=-D_GLIBCXX_ASSERTIONS -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
[DEBUG]: CXXFLAGS=-ggdb -fpermissive -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -fPIC -fPIC -ggdb -O2 -fno-omit-frame-pointer -flto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
[DEBUG]: OBJCFLAGS=-pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -fPIC -fPIC -ggdb -O2 -fno-omit-frame-pointer -flto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
[DEBUG]: OBJCXXFLAGS=-fpermissive -ggdb -fpermissive -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fexceptions -fPIC -fPIC -ggdb -O2 -fno-omit-frame-pointer -flto -mabi=lp64d -mstrict-align -march=loongarch64 -mtune=loongarch64 -msimd=none
[DEBUG]: RUSTFLAGS=-Ccodegen-units=1 -Copt-level=3 -Cdebuginfo=line-tables-only -Cforce-frame-pointers=yes -Cembed-bitcode=yes -Clinker-plugin-lto -Clinker=clang -Clink-arg=-flto -Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,-build-id=sha1 -Clink-arg=-Wl,--lto-O3 -Ctarget-cpu=generic-la64 -Ctarget-feature=-lsx,+d -Clink-arg=-mabi=lp64
When using rustc 1.89.0, lsx exists
图片
Recompile rustc 1.89.0 with this patch (f028b9b) , lsx no longer exists
图片
This patch works as we expected
Link: rust-lang/rust#146144 Signed-off-by: Ilikara <3435193369@qq.com>
@bors r+
Rollup of 11 pull requests Successful merges: - #138944 (Add `__isPlatformVersionAtLeast` and `__isOSVersionAtLeast` symbols) - #139113 (unstable book: in a sanitizer example, check the code) - #145735 (style-guide: Document absence of trailing whitespace) - #146041 (tidy: --bless now makes escheck run with --fix) - #146144 (compiler: Apply target features to the entry function) - #146225 (Simplify `{f16, f32, f64, f128}::midpoint()`) - #146234 (change file-is-generated doc comment to inner) - #146241 (rustc_infer: change top-level doc comment to inner) - #146242 (Ensure that `--html-after-content` option is used to check `scrape_examples_ice` rustdoc GUI test) - #146243 (remove couple of redundant clones) - #146250 (Bump stage0 rustfmt) Failed merges: - #146200 (Simplify rustdoc-gui tester by calling directly browser-ui-test) r? `@ghost` `@rustbot` modify labels: rollup
Link: rust-lang/rust#146144 Signed-off-by: Ilikara <3435193369@qq.com>
Fixes #146143