[libc++] Support -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on in CI
authorFangrui Song <i@maskray.me>
Mon, 30 Aug 2021 19:59:07 +0000 (12:59 -0700)
committerFangrui Song <i@maskray.me>
Mon, 30 Aug 2021 19:59:08 +0000 (12:59 -0700)
commitdaf0dfb786f0d72c2cd39a64a97f1593ccaebadf
treed4db6a28d3dc9f9eb0fbc8b63c7d1160d0e8bdf7
parent070090cfa57f282e64ef355d2f8b8232bddedaf5
[libc++] Support -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on in CI

This fixes -isystem/-L/-Wl,-rpath paths when -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=on
is used (https://reviews.llvm.org/D107799#2969650).

* `-isystem path/to/build/generic-cxx17/include/c++/v1`. `build/generic-cxx17/include/x86_64-unknown-linux-gnu/c++/v1 (__config_site)` is missing.
* `-L path/to/build/generic-cxx17/lib`. Should be `build/generic-cxx17/lib/x86_64-unknown-linux-gnu` instead

Reviewed By: ldionne, phosek, #libc

Differential Revision: https://reviews.llvm.org/D108836
libcxx/test/configs/libcxx-trunk-shared.cfg.in
libcxx/test/configs/libcxx-trunk-static.cfg.in