-
Notifications
You must be signed in to change notification settings - Fork 12k
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
[libc++] Improve behavior when using relative path for LIBCXX_ASSERTION_HANDLER_FILE #100157
Merged
ldionne
merged 1 commit into
llvm:main
from
ldionne:review/relative-assertion-handler-file
Jul 24, 2024
Merged
[libc++] Improve behavior when using relative path for LIBCXX_ASSERTION_HANDLER_FILE #100157
ldionne
merged 1 commit into
llvm:main
from
ldionne:review/relative-assertion-handler-file
Jul 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ON_HANDLER_FILE Fixes llvm#80696
llvmbot
added
the
libc++
libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
label
Jul 23, 2024
@llvm/pr-subscribers-libcxx Author: Louis Dionne (ldionne) ChangesFixes #80696 Full diff: https://github.com/llvm/llvm-project/pull/100157.diff 2 Files Affected:
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 332816b15260a..674082c7d1787 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -71,12 +71,16 @@ if (NOT "${LIBCXX_HARDENING_MODE}" IN_LIST LIBCXX_SUPPORTED_HARDENING_MODES)
"Unsupported hardening mode: '${LIBCXX_HARDENING_MODE}'. Supported values are ${LIBCXX_SUPPORTED_HARDENING_MODES}.")
endif()
set(LIBCXX_ASSERTION_HANDLER_FILE
- "${CMAKE_CURRENT_SOURCE_DIR}/vendor/llvm/default_assertion_handler.in"
+ "vendor/llvm/default_assertion_handler.in"
CACHE STRING
"Specify the path to a header that contains a custom implementation of the
assertion handler that gets invoked when a hardening assertion fails. If
provided, this header will be included by the library, replacing the
- default assertion handler.")
+ default assertion handler. If this is specified as a relative path, it
+ is assumed to be relative to '<monorepo>/libcxx'.")
+if (NOT IS_ABSOLUTE "${LIBCXX_ASSERTION_HANDLER_FILE}")
+ set(LIBCXX_ASSERTION_HANDLER_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${LIBCXX_ASSERTION_HANDLER_FILE}")
+endif()
option(LIBCXX_ENABLE_RANDOM_DEVICE
"Whether to include support for std::random_device in the library. Disabling
this can be useful when building the library for platforms that don't have
diff --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst
index 66bb19bb5b2cd..5c224689e0f9f 100644
--- a/libcxx/docs/BuildingLibcxx.rst
+++ b/libcxx/docs/BuildingLibcxx.rst
@@ -406,7 +406,8 @@ libc++ Feature Options
Specify the path to a header that contains a custom implementation of the
assertion handler that gets invoked when a hardening assertion fails. If
provided, this header will be included by the library, replacing the
- default assertion handler.
+ default assertion handler. If this is specified as a relative path, it
+ is assumed to be relative to ``<monorepo>/libcxx``.
libc++ ABI Feature Options
|
/cherry-pick 046a177 |
llvmbot
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 24, 2024
…ON_HANDLER_FILE (llvm#100157) Fixes llvm#80696 (cherry picked from commit 046a177)
/pull-request #100411 |
yuxuanchen1997
pushed a commit
that referenced
this pull request
Jul 25, 2024
…ON_HANDLER_FILE (#100157) Summary: Fixes #80696 Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250671
tru
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Jul 26, 2024
…ON_HANDLER_FILE (llvm#100157) Fixes llvm#80696 (cherry picked from commit 046a177)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #80696