Page MenuHomePhabricator

[libc++] Remove workarounds for systems with tortuous include requirements
Needs ReviewPublic

Authored by ldionne on Aug 8 2022, 12:18 PM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Libc++ tried accomodating systems that need to be able to define various
__need_FOO macros before including C library headers, however it does not
appear to be needed anymore in most cases. Indeed, glibc used to use that
system to conditionally provide definitions, however almost all instances
of these macros have been removed from glibc years ago.

I think the next step would be to also fix Clang's own builtin headers
to stop needing these macros.

Diff Detail

Unit TestsFailed

TimeTest
90 mslibcxx CI C++11 > llvm-libc++abi-shared-cfg-in.llvm-libc++abi-shared-cfg-in::catch_reference_nullptr.pass.cpp
Script: -- : 'COMPILED WITH'; /usr/bin/c++ /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/libcxxabi/test/catch_reference_nullptr.pass.cpp --target=x86_64-unknown-linux-gnu -nostdinc++ -I /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/libcxxabi/include -I /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/build/generic-cxx11/include/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/build/generic-cxx11/include/x86_64-unknown-linux-gnu/c++/v1 -I /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/test/support -I /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/libcxxabi/../libcxx/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -std=c++11 -Werror -Wall -Wextra -Wshadow -Wundef -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-noexcept-type -Wno-atomic-alignment -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_DISABLE_AVAILABILITY -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -nostdlib++ -L /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -Wl,-rpath,/home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/build/generic-cxx11/lib -lc++ -lc++abi -pthread -o /home/libcxx-builder/.buildkite-agent/builds/2c80c8f6aa29-1/llvm-project/libcxx-ci/build/generic-cxx11/Output/catch_reference_nullptr.pass.cpp.dir/t.tmp.exe
3,810 mslibcxx CI C++2b > llvm-libc++-shared-cfg-in.libcxx::modules_include.sh.cpp
Script: -- : 'RUN: at line 44'; rm -rf /home/libcxx-builder/.buildkite-agent/builds/0749c4e86a5b-1/llvm-project/libcxx-ci/build/generic-cxx2b/test/libcxx/Output/modules_include.sh.cpp.dir/t.tmp

Event Timeline

ldionne created this revision.Aug 8 2022, 12:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 12:18 PM
ldionne requested review of this revision.Aug 8 2022, 12:18 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 8 2022, 12:18 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript

I am expecting CI to let me know whether these workarounds are still needed.

ldionne updated this revision to Diff 451589.Aug 10 2022, 11:43 AM
ldionne edited the summary of this revision. (Show Details)

Fix issues.