Skip to content

Handle move of cpu_model.c#564

Merged
Amanieu merged 1 commit into
rust-lang:masterfrom
tmandry:cpu-model-moved
Jan 28, 2024
Merged

Handle move of cpu_model.c#564
Amanieu merged 1 commit into
rust-lang:masterfrom
tmandry:cpu-model-moved

Conversation

@tmandry

@tmandry tmandry commented Jan 5, 2024

Copy link
Copy Markdown
Member

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

@tmandry

tmandry commented Jan 5, 2024

Copy link
Copy Markdown
Member Author

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

Amanieu commented Jan 8, 2024

Copy link
Copy Markdown
Member

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

Amanieu commented Jan 22, 2024

Copy link
Copy Markdown
Member

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

@nikic

nikic commented Jan 22, 2024

Copy link
Copy Markdown
Contributor

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

nikic commented Jan 26, 2024

Copy link
Copy Markdown
Contributor

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

@Amanieu

Amanieu commented Jan 28, 2024

Copy link
Copy Markdown
Member

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

nikic commented Jan 28, 2024

Copy link
Copy Markdown
Contributor

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

Amanieu commented Jan 28, 2024

Copy link
Copy Markdown
Member

Actually I just realized that I can do it myself.

@Amanieu Amanieu merged commit 32cb975 into rust-lang:master Jan 28, 2024
@Amanieu

Amanieu commented Jan 31, 2024

Copy link
Copy Markdown
Member

@nikic Published in 0.1.107.

@nikic

nikic commented Jan 31, 2024

Copy link
Copy Markdown
Contributor

Thanks!

tgross35 pushed a commit that referenced this pull request Jan 31, 2026
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