-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Compile test_num_f128
conditionally on reliable_f128_math
config
#132696
Compile test_num_f128
conditionally on reliable_f128_math
config
#132696
Conversation
rustbot has assigned @workingjubilee. Use |
@@ -2,7 +2,9 @@ | |||
#![cfg(reliable_f128)] |
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.
This doesn't seem to work. I disregarded that as I wanted to have a minimal PR. Should I remove this, move the conditional compilation to the mod tests;
statement (but that's even easier for developers to miss), or use a mod
statement within this tests
module with a proper single conditional compilation statement?
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.
That config is set here
Lines 120 to 143 in 4d215e2
let has_reliable_f128 = match (target_arch.as_str(), target_os.as_str()) { | |
// We can always enable these in Miri as that is not affected by codegen bugs. | |
_ if is_miri => true, | |
// Unsupported <https://github.com/llvm/llvm-project/issues/94434> | |
("arm64ec", _) => false, | |
// Selection bug <https://github.com/llvm/llvm-project/issues/96432> | |
("mips64" | "mips64r6", _) => false, | |
// Selection bug <https://github.com/llvm/llvm-project/issues/95471> | |
("nvptx64", _) => false, | |
// ABI bugs <https://github.com/rust-lang/rust/issues/125109> et al. (full | |
// list at <https://github.com/rust-lang/rust/issues/116909>) | |
("powerpc" | "powerpc64", _) => false, | |
// ABI unsupported <https://github.com/llvm/llvm-project/issues/41838> | |
("sparc", _) => false, | |
// Stack alignment bug <https://github.com/llvm/llvm-project/issues/77401>. NB: tests may | |
// not fail if our compiler-builtins is linked. | |
("x86", _) => false, | |
// MinGW ABI bugs <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115054> | |
("x86_64", "windows") if target_env == "gnu" && target_abi != "llvm" => false, | |
// There are no known problems on other platforms, so the only requirement is that symbols | |
// are available. `compiler-builtins` provides all symbols required for core `f128` | |
// support, so this should work for everything else. | |
_ => true, | |
}; |
reliable_f128_math
is the gate that should cover anything that relies on libm
symbols. I think we just didn't catch this because fmodl
is available on many platforms even when the rest of the math symbols might not be.
So moving only calls to functions that rely on f128
libm
to reliable_f128_math
should be the needed correction (suggested by @beetrees below), everything else should continue to work on SGX and other platforms as long as it isn't in the linked list.
LGTM |
This comment has been minimized.
This comment has been minimized.
cc @tgross35 |
r? @tgross35 |
Could you apply beetrees suggestion and @rustbot author |
Sorry about that folks, we've been trying to make the builtins calls less of a problem but it's slow going. |
62c0c99
to
66c2e38
Compare
This comment has been minimized.
This comment has been minimized.
1c21304
to
c614469
Compare
This comment has been minimized.
This comment has been minimized.
c614469
to
0720880
Compare
@bors r+ |
…issing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With rust-lang#132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: `@jethrogb,` `@workingjubilee`
…issing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With rust-lang#132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: ``@jethrogb,`` ``@workingjubilee``
…llaumeGomez Rollup of 8 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132738 (Initialize channel `Block`s directly on the heap) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) r? `@ghost` `@rustbot` modify labels: rollup
…issing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With rust-lang#132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: ```@jethrogb,``` ```@workingjubilee```
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#132696 - fortanix:raoul/rte-235-fix_fmodl_missing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With rust-lang#132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: ````@jethrogb,```` ````@workingjubilee````
…issing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With rust-lang#132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: ````@jethrogb,```` ````@workingjubilee````
…kingjubilee Rollup of 10 pull requests Successful merges: - rust-lang#130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - rust-lang#131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - rust-lang#132095 (Fix rust-lang#131977 parens mangled in shared mut static lint suggestion) - rust-lang#132131 ([StableMIR] API to retrieve definitions from crates) - rust-lang#132639 (core: move intrinsics.rs into intrinsics folder) - rust-lang#132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - rust-lang#132737 (bootstrap: Print better message if lock pid isn't available) - rust-lang#132739 (Fix `librustdoc/scrape_examples.rs` formatting) - rust-lang#132740 (Update test for LLVM 20's new vector splat syntax) - rust-lang#132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
With #132434 merged, our internal SGX CI started failing with:
This originated from the
test_num_f128
test not having the required conditional compilation. This PR fixes that issue.cc: @jethrogb, @workingjubilee