diff --git a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in --- a/libcxx/test/configs/apple-libc++-backdeployment.cfg.in +++ b/libcxx/test/configs/apple-libc++-backdeployment.cfg.in @@ -45,10 +45,10 @@ '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -isystem %{install}/include/c++/v1 -I %{libcxx}/test/support' + '-nostdinc++ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++' + '-nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- ' diff --git a/libcxx/test/configs/apple-libc++-shared.cfg.in b/libcxx/test/configs/apple-libc++-shared.cfg.in --- a/libcxx/test/configs/apple-libc++-shared.cfg.in +++ b/libcxx/test/configs/apple-libc++-shared.cfg.in @@ -13,13 +13,13 @@ '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{install}/include/c++/v1 -I %{libcxx}/test/support' + '-nostdinc++ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++' + '-nostdlib++ -L %{lib} -lc++' )) config.substitutions.append(('%{exec}', - '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{install}/lib -- ' + '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib} -- ' )) import os, site diff --git a/libcxx/test/configs/cmake-bridge.cfg.in b/libcxx/test/configs/cmake-bridge.cfg.in --- a/libcxx/test/configs/cmake-bridge.cfg.in +++ b/libcxx/test/configs/cmake-bridge.cfg.in @@ -27,8 +27,7 @@ # Add substitutions for bootstrapping the test suite configuration config.substitutions.append(('%{cxx}', shlex.quote('@CMAKE_CXX_COMPILER@'))) config.substitutions.append(('%{libcxx}', '@LIBCXX_SOURCE_DIR@')) -config.substitutions.append(('%{install}', '@CMAKE_BINARY_DIR@')) -config.substitutions.append(('%{include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_DIR@')) -config.substitutions.append(('%{target-include}', '%{install}/@LIBCXX_INSTALL_INCLUDE_TARGET_DIR@')) -config.substitutions.append(('%{lib}', '%{install}/@LIBCXX_INSTALL_LIBRARY_DIR@')) +config.substitutions.append(('%{include}', '@LIBCXX_GENERATED_INCLUDE_DIR@')) +config.substitutions.append(('%{target-include}', '@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@')) +config.substitutions.append(('%{lib}', '@LIBCXX_LIBRARY_DIR@')) config.substitutions.append(('%{executor}', '@LIBCXX_EXECUTOR@')) diff --git a/libcxx/test/configs/ibm-libc++-shared.cfg.in b/libcxx/test/configs/ibm-libc++-shared.cfg.in --- a/libcxx/test/configs/ibm-libc++-shared.cfg.in +++ b/libcxx/test/configs/ibm-libc++-shared.cfg.in @@ -6,13 +6,13 @@ config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{install}/include/c++/v1 -I %{libcxx}/test/support' + '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++ -lc++abi -latomic -Wl,-bbigtoc' + '-nostdlib++ -L %{lib} -lc++ -lc++abi -latomic -Wl,-bbigtoc' )) config.substitutions.append(('%{exec}', - '%{executor} --execdir %T --env LIBPATH=%{install}/lib -- ' + '%{executor} --execdir %T --env LIBPATH=%{lib} -- ' )) # LIBCXX-AIX-FIXME is the feature name used to XFAIL the diff --git a/libcxx/test/libcxx/vendor/apple/system-install-properties.sh.cpp b/libcxx/test/libcxx/vendor/apple/system-install-properties.sh.cpp --- a/libcxx/test/libcxx/vendor/apple/system-install-properties.sh.cpp +++ b/libcxx/test/libcxx/vendor/apple/system-install-properties.sh.cpp @@ -10,21 +10,19 @@ // This file checks various properties of the installation of libc++ when built as // a system library on Apple platforms. -// -// TODO: We should install to `/usr` in CMake and check that path instead. // Make sure we install the libc++ headers in the right location. // -// RUN: stat "%{install}/include/c++/v1/__config" +// RUN: stat "%{include}/__config" // Make sure we install libc++.1.dylib in the right location. // -// RUN: stat "%{install}/lib/libc++.1.dylib" +// RUN: stat "%{lib}/libc++.1.dylib" // Make sure we install a symlink from libc++.dylib to libc++.1.dylib. // -// RUN: stat "%{install}/lib/libc++.dylib" -// RUN: readlink "%{install}/lib/libc++.dylib" | grep "libc++.1.dylib" +// RUN: stat "%{lib}/libc++.dylib" +// RUN: readlink "%{lib}/libc++.dylib" | grep "libc++.1.dylib" // Make sure the install_name is /usr/lib. // @@ -35,11 +33,11 @@ // // TODO: We currently don't do that correctly in the CMake build. // -// XRUNX: otool -L "%{install}/lib/libc++.1.dylib" | grep '/usr/lib/libc++.1.dylib' -// XRUNX: ! otool -l "%{install}/lib/libc++.1.dylib" | grep -E "LC_RPATH|@loader_path|@rpath" +// XRUNX: otool -L "%{lib}/libc++.1.dylib" | grep '/usr/lib/libc++.1.dylib' +// XRUNX: ! otool -l "%{lib}/libc++.1.dylib" | grep -E "LC_RPATH|@loader_path|@rpath" // Make sure the compatibility_version of libc++ is 1.0.0. // Failure to respect this can result in applications not being able to find libc++ // when they are loaded by dyld, if the compatibility version was bumped. // -// RUN: otool -L "%{install}/lib/libc++.1.dylib" | grep "libc++.1.dylib" | grep "compatibility version 1.0.0" +// RUN: otool -L "%{lib}/libc++.1.dylib" | grep "libc++.1.dylib" | grep "compatibility version 1.0.0" diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot --- a/libcxx/utils/ci/run-buildbot +++ b/libcxx/utils/ci/run-buildbot @@ -497,8 +497,8 @@ -DRUNTIMES_BUILD_ALLOW_DARWIN=ON \ -DLLVM_ENABLE_ASSERTIONS=ON \ -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-modules.cmake" \ - -DLIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ - -DLIBUNWIND_TEST_CONFIG="llvm-libunwind-shared.cfg.in" + -DRUNTIMES_LIBCXX_TEST_CONFIG="llvm-libc++-shared.cfg.in" \ + -DRUNTIMES_LIBUNWIND_TEST_CONFIG="llvm-libunwind-shared.cfg.in" echo "+++ Running the libc++ and libc++abi tests" ${NINJA} -C "${BUILD_DIR}" check-runtimes diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -455,7 +455,6 @@ sub.append(('%{flags}', ' '.join(map(self.quote, flags)))) sub.append(('%{compile_flags}', ' '.join(map(self.quote, compile_flags)))) sub.append(('%{link_flags}', ' '.join(map(self.quote, self.cxx.link_flags)))) - sub.append(('%{install}', self.quote(self.config.install_root))) codesign_ident = self.get_lit_conf('llvm_codesign_identity', '') env_vars = ' '.join('%s=%s' % (k, self.quote(v)) for (k, v) in self.exec_env.items()) diff --git a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in --- a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in +++ b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in @@ -45,11 +45,11 @@ '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + + '-nostdinc++ -I %{include} -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++ -lc++abi' + '-nostdlib++ -L %{lib} -lc++ -lc++abi' )) config.substitutions.append(('%{exec}', '%{executor} --execdir %T --env DYLD_LIBRARY_PATH="%{cxx-runtime-root}:%{abi-runtime-root}:%{unwind-runtime-root}" -- ' diff --git a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in --- a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in @@ -6,14 +6,14 @@ '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else '' )) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{install}/include/c++/v1 -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + + '-nostdinc++ -I %{include} -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++ -lc++abi' + '-nostdlib++ -L %{lib} -lc++ -lc++abi' )) config.substitutions.append(('%{exec}', - '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{install}/lib -- ' + '%{executor} --execdir %T --env DYLD_LIBRARY_PATH=%{lib} -- ' )) import os, site diff --git a/libcxxabi/test/configs/cmake-bridge.cfg.in b/libcxxabi/test/configs/cmake-bridge.cfg.in --- a/libcxxabi/test/configs/cmake-bridge.cfg.in +++ b/libcxxabi/test/configs/cmake-bridge.cfg.in @@ -28,5 +28,7 @@ config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@')) config.substitutions.append(('%{libcxx}', '@LIBCXXABI_LIBCXX_PATH@')) -config.substitutions.append(('%{install}', '@CMAKE_BINARY_DIR@')) +config.substitutions.append(('%{include}', '@LIBCXXABI_HEADER_DIR@/include/c++/v1')) +config.substitutions.append(('%{target-include}', '@LIBCXXABI_HEADER_DIR@/%{triple}/include/c++/v1')) +config.substitutions.append(('%{lib}', '@LIBCXXABI_LIBRARY_DIR@')) config.substitutions.append(('%{executor}', '@LIBCXXABI_EXECUTOR@')) diff --git a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in --- a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in @@ -4,16 +4,16 @@ config.substitutions.append(('%{flags}','')) config.substitutions.append(('%{compile_flags}', - '-nostdinc++ -I %{install}/include/c++/v1 ' + + '-nostdinc++ -I %{include} ' + '-D__LIBC_NO_CPP_MATH_OVERLOADS__ -DLIBCXXABI_NO_TIMER ' + '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' + '-I %{libcxx}/test/support -I %{libcxx}/src' )) config.substitutions.append(('%{link_flags}', - '-nostdlib++ -L %{install}/lib -lc++ -lc++abi -Wl,-bbigtoc' + '-nostdlib++ -L %{lib} -lc++ -lc++abi -Wl,-bbigtoc' )) config.substitutions.append(('%{exec}', - '%{executor} --execdir %T --env LIBPATH=%{install}/lib -- ' + '%{executor} --execdir %T --env LIBPATH=%{lib} -- ' )) import os, site diff --git a/libcxxabi/test/vendor/apple/system-install-properties.sh.cpp b/libcxxabi/test/vendor/apple/system-install-properties.sh.cpp --- a/libcxxabi/test/vendor/apple/system-install-properties.sh.cpp +++ b/libcxxabi/test/vendor/apple/system-install-properties.sh.cpp @@ -10,24 +10,22 @@ // This file checks various properties of the installation of libc++abi when built // as a system library on Apple platforms. -// -// TODO: We should install to `/usr` in CMake and check that path instead. // Make sure we install the libc++abi headers in the right location. // TODO: We don't currently install them, but we should. // -// XRUNX: stat "%{install}/include/cxxabi.h" +// XRUNX: stat "%{include}/cxxabi.h" // Make sure we install libc++abi.dylib in the right location. // -// RUN: stat "%{install}/lib/libc++abi.dylib" +// RUN: stat "%{lib}/libc++abi.dylib" // Make sure we don't install a symlink from libc++abi.dylib to libc++abi.1.dylib, // unlike what we do for libc++.dylib. // TODO: We currently don't do that correctly in the CMake build. // -// XRUNX: ! readlink "%{install}/lib/libc++abi.dylib" -// XRUNX: ! stat "%{install}/lib/libc++abi.1.dylib" +// XRUNX: ! readlink "%{lib}/libc++abi.dylib" +// XRUNX: ! stat "%{lib}/libc++abi.1.dylib" // Make sure the install_name is /usr/lib. // @@ -38,11 +36,11 @@ // // TODO: We currently don't do that correctly in the CMake build. // -// XRUNX: otool -L "%{install}/lib/libc++abi.dylib" | grep '/usr/lib/libc++abi.dylib' -// XRUNX: ! otool -l "%{install}/lib/libc++abi.dylib" | grep -E "LC_RPATH|@loader_path|@rpath" +// XRUNX: otool -L "%{lib}/libc++abi.dylib" | grep '/usr/lib/libc++abi.dylib' +// XRUNX: ! otool -l "%{lib}/libc++abi.dylib" | grep -E "LC_RPATH|@loader_path|@rpath" // Make sure the compatibility_version of libc++abi is 1.0.0. Failure to respect this can result // in applications not being able to find libc++abi when they are loaded by dyld, if the // compatibility version was bumped. // -// RUN: otool -L "%{install}/lib/libc++abi.dylib" | grep "libc++abi.1.dylib" | grep "compatibility version 1.0.0" +// RUN: otool -L "%{lib}/libc++abi.dylib" | grep "libc++abi.1.dylib" | grep "compatibility version 1.0.0"