Skip to content

[libc++] LIBCXX_ASSERTION_HANDLER_FILE needs to be relative from libcxx/include, which is strange #80696

@ldionne

Description

@ldionne

When we added LIBCXX_ASSERTION_HANDLER_FILE, we did not specify whether it was a relative or an absolute path, and if relative, we did not specify relative to what it would be evaluated. That makes it extremely challenging to specify the path in a CMake cache file.

From a cache file, variables like CMAKE_SOURCE_DIR expand to runtimes/ since that's where the "top-level" CMakeLists.txt is located. So using an absolute path has to look awkward like ${CMAKE_SOURCE_DIR}/../libcxx/vendor/foo/some_assertion_handler.in.

Using a relative path is weird too: the path seems to be evaluated relative to libcxx/include since that's where the LIBCXX_ASSERTION_HANDLER_FILE is used in configure_file, and that is confusing too.

Metadata

Metadata

Assignees

Labels

cmakeBuild system in general and CMake in particularhardeningIssues related to the hardening effortlibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions