Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[libc++] Enable sized deallocation when building operator new shims on Apple #134152

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Apr 2, 2025

This ensures that we are able to build the shims on compilers that enable sized deallocation by default and those that don't, regardless.

…n Apple

This ensures that we are able to build the shims on compilers that
enable sized deallocation by default and those that don't, regardless.
@ldionne ldionne requested a review from a team as a code owner April 2, 2025 20:35
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Apr 2, 2025
@llvmbot
Copy link
Member

llvmbot commented Apr 2, 2025

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

This ensures that we are able to build the shims on compilers that enable sized deallocation by default and those that don't, regardless.


Full diff: https://github.com/llvm/llvm-project/pull/134152.diff

1 Files Affected:

  • (modified) libcxx/utils/ci/apple-install-libcxx.sh (+3-1)
diff --git a/libcxx/utils/ci/apple-install-libcxx.sh b/libcxx/utils/ci/apple-install-libcxx.sh
index 1b1c30449d5af..eb55bcc634840 100755
--- a/libcxx/utils/ci/apple-install-libcxx.sh
+++ b/libcxx/utils/ci/apple-install-libcxx.sh
@@ -119,7 +119,9 @@ for arch in ${architectures}; do
     step "Building shims to make libc++ compatible with the system libc++ on Apple platforms when running the tests"
     shims_library="${build_dir}/${arch}/apple-system-shims.a"
     # Note that this doesn't need to match the Standard version used to build the rest of the library.
-    xcrun clang++ -c -std=c++2b -target ${target} "${llvm_root}/libcxxabi/src/vendor/apple/shims.cpp" -static -o "${shims_library}"
+    # Also note that we explicitly enable sized deallocation when building the shims to ensure that we provide as
+    # many symbols as possible.
+    xcrun clang++ -c -std=c++2b -fsized-deallocation -target ${target} "${llvm_root}/libcxxabi/src/vendor/apple/shims.cpp" -static -o "${shims_library}"
 
     step "Building libc++.dylib and libc++abi.dylib for architecture ${arch}"
     xcrun cmake -S "${llvm_root}/runtimes" \

@ldionne ldionne merged commit 3ea0754 into llvm:main May 6, 2025
85 checks passed
@ldionne ldionne deleted the review/sized-deallocation-apple-shims branch May 6, 2025 19:21
@llvm-ci
Copy link
Collaborator

llvm-ci commented May 6, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-8-cmake-build-only running on rocm-docker-rhel-8 while building libcxx at step 2 "update-annotated-scripts".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/204/builds/8484

Here is the relevant piece of the build log for the reference
Step 2 (update-annotated-scripts) failure: update (failure)
git version 2.43.5
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443: Connection timed out
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443: Connection timed out

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 6, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-rhel-9-cmake-build-only running on rocm-docker-rhel-9 while building libcxx at step 2 "update-annotated-scripts".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/205/builds/8462

Here is the relevant piece of the build log for the reference
Step 2 (update-annotated-scripts) failure: update (failure)
git version 2.43.5
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443: Connection timed out
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443: Connection timed out

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 6, 2025

LLVM Buildbot has detected a new failure on builder clang-hip-vega20 running on hip-vega20-0 while building libcxx at step 2 "update-annotated-scripts".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/18860

Here is the relevant piece of the build log for the reference
Step 2 (update-annotated-scripts) failure: update (failure)
git version 2.34.1
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443 after 134582 ms: Connection timed out
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443 after 134937 ms: Connection timed out

@llvm-ci
Copy link
Collaborator

llvm-ci commented May 6, 2025

LLVM Buildbot has detected a new failure on builder amdgpu-offload-ubuntu-22-cmake-build-only running on rocm-docker-ubu-22 while building libcxx at step 2 "update-annotated-scripts".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/203/builds/9671

Here is the relevant piece of the build log for the reference
Step 2 (update-annotated-scripts) failure: update (failure)
git version 2.34.1
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443 after 135886 ms: Connection timed out
fatal: unable to access 'https://github.com/llvm/llvm-zorg.git/': Failed to connect to github.com port 443 after 134895 ms: Connection timed out

GeorgeARM pushed a commit to GeorgeARM/llvm-project that referenced this pull request May 7, 2025
…n Apple (llvm#134152)

This ensures that we are able to build the shims on compilers that
enable sized deallocation by default and those that don't, regardless.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants