Skip to content
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

Handle move of cpu_model.c #564

Merged
merged 1 commit into from
Jan 28, 2024
Merged

Conversation

tmandry
Copy link
Member

@tmandry tmandry commented Jan 5, 2024

This happened in https://github.com/llvm/llvm-project/pull/75635/files
and shows up when building against a recent commit of LLVM.

@tmandry
Copy link
Member Author

tmandry commented Jan 5, 2024

Hmm, getting some errors that look unrelated.

  running: "/code/clang/bin/clang" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-gdwarf-4" "-fno-omit-frame-pointer" "--target=aarch64-unknown-linux-gnu" "-ffunction-sections" "-fdata-sections" "-fPIC" "--target=aarch64-unknown-linux-gnu" "--target=aarch64-unknown-linux-gnu" "--sysroot=/code/sysroot/linux" "-mno-outline-atomics" "-I" "/code/rust/src/llvm-project/compiler-rt/lib/builtins" "-fno-builtin" "-fvisibility=hidden" "-ffreestanding" "-fomit-frame-pointer" "-ffile-prefix-map=/code/rust/src/llvm-project/compiler-rt=." "-DVISIBILITY_HIDDEN" "-o" "/code/rust/fuchsia-build/x86_64-unknown-linux-gnu/stage2-std/aarch64-unknown-linux-gnu/release/build/compiler_builtins-cdaf04ce8a85a739/out/83a412010abc9682-divxc3.o" "-c" "/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c"
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:35: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   20 | COMPILER_RT_ABI Lcomplex __divxc3(xf_float __a, xf_float __b, xf_float __c,
  cargo:warning=      |                                   ^~~~~~~~
  cargo:warning=      |                                   tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:49: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   20 | COMPILER_RT_ABI Lcomplex __divxc3(xf_float __a, xf_float __b, xf_float __c,
  cargo:warning=      |                                                 ^~~~~~~~
  cargo:warning=      |                                                 tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:20:63: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   20 | COMPILER_RT_ABI Lcomplex __divxc3(xf_float __a, xf_float __b, xf_float __c,
  cargo:warning=      |                                                               ^~~~~~~~
  cargo:warning=      |                                                               tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:21:35: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   21 |                                   xf_float __d) {
  cargo:warning=      |                                   ^~~~~~~~
  cargo:warning=      |                                   tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:23:3: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   23 |   xf_float __logbw = crt_logbl(crt_fmaxl(crt_fabsl(__c), crt_fabsl(__d)));
  cargo:warning=      |   ^~~~~~~~
  cargo:warning=      |   tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/divxc3.c:29:3: error: unknown type name 'xf_float'; did you mean 'tf_float'?
  cargo:warning=   29 |   xf_float __denom = __c * __c + __d * __d;
  cargo:warning=      |   ^~~~~~~~
  cargo:warning=      |   tf_float
  cargo:warning=/code/rust/src/llvm-project/compiler-rt/lib/builtins/int_types.h:198:21: note: 'tf_float' declared here
  cargo:warning=  198 | typedef long double tf_float;
  cargo:warning=      |                     ^
  cargo:warning=6 errors generated.
  exit status: 1

@Amanieu
Copy link
Member

Amanieu commented Jan 8, 2024

The *xc/*xf files are for 80-bit floats, which only exist on x86/x86_64, except on Android and MSVC targets. These files not not be included for aarch64 targets.

@Amanieu
Copy link
Member

Amanieu commented Jan 22, 2024

I believe the compilation error has been addressed by #568.

@nikic
Copy link
Contributor

nikic commented Jan 22, 2024

I verified that after this PR is merged, it's possible to build dist-aarch64-linux with LLVM 18.

bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 26, 2024
Update to LLVM 18

Blocked on rust-lang#120376.
Blocked on rust-lang/compiler-builtins#564.

LLVM 18 final is planned to be released on Mar 5th. Rust 1.77 is planned to be released on Mar 21st.

Tested images: dist-x86_64-linux, dist-s390x-linux, dist-aarch64-linux, dist-riscv64-linux, dist-x86_64-freebsd, dist-x86_64-illumos x86_64-linux-integration, test-various, armhf-gnu

r? `@ghost`
@nikic
Copy link
Contributor

nikic commented Jan 26, 2024

@Amanieu Could you please merge this PR and create a new compiler-builtins release with it?

@Amanieu
Copy link
Member

Amanieu commented Jan 28, 2024

I can't merge the PR since it is still marked as a draft.

@tmandry Is there anything left to do for this PR?

@nikic
Copy link
Contributor

nikic commented Jan 28, 2024

Would it help if I open a new non-draft PR for the change?

@Amanieu Amanieu marked this pull request as ready for review January 28, 2024 11:19
This happened in https://github.com/llvm/llvm-project/pull/75635/files
and shows up when building against a recent commit of LLVM.
@Amanieu
Copy link
Member

Amanieu commented Jan 28, 2024

Actually I just realized that I can do it myself.

@Amanieu Amanieu merged commit 32cb975 into rust-lang:master Jan 28, 2024
22 checks passed
@Amanieu
Copy link
Member

Amanieu commented Jan 31, 2024

@nikic Published in 0.1.107.

@nikic
Copy link
Contributor

nikic commented Jan 31, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants