Skip to content

Conversation

@ldionne
Copy link
Member

@ldionne ldionne commented Jul 8, 2024

This patch adds tests for a few properties of the installation of libc++ in
the upstream LLVM configuration. We already have installation property
tests for specific vendor configurations, but it also makes sense to have
such tests for the configuration used by the LLVM release.

@ldionne ldionne requested review from a team as code owners July 8, 2024 21:14
@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. libc++abi libc++abi C++ Runtime Library. Not libc++. labels Jul 8, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 8, 2024

@llvm/pr-subscribers-libcxxabi

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

This patch adds tests for a few properties of the installation of libc++ in
the upstream LLVM configuration. We already have installation property
tests for specific vendor configurations, but it also makes sense to have
such tests for the configuration used by the LLVM release.


Full diff: https://github.com/llvm/llvm-project/pull/98077.diff

2 Files Affected:

  • (added) libcxx/test/libcxx/vendor/llvm/system-install-properties.sh.cpp (+26)
  • (added) libcxxabi/test/vendor/llvm/system-install-properties.sh.cpp (+25)
diff --git a/libcxx/test/libcxx/vendor/llvm/system-install-properties.sh.cpp b/libcxx/test/libcxx/vendor/llvm/system-install-properties.sh.cpp
new file mode 100644
index 0000000000000..ba9878cae131b
--- /dev/null
+++ b/libcxx/test/libcxx/vendor/llvm/system-install-properties.sh.cpp
@@ -0,0 +1,26 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: stdlib=libc++ && !stdlib=apple-libc++
+
+// This file checks various properties of the installation of libc++ when built under
+// a vanilla upstream configuration.
+
+// Make sure we install the libc++ headers in the right location.
+//
+// RUN: stat "%{include-dir}/__config"
+
+// Make sure we install libc++.1.dylib and libc++experimental.a in the right location.
+//
+// RUN: stat "%{lib-dir}/libc++.1.dylib"
+// RUN: stat "%{lib-dir}/libc++experimental.a"
+
+// Make sure we install a symlink from libc++.dylib to libc++.1.dylib.
+//
+// RUN: stat "%{lib-dir}/libc++.dylib"
+// RUN: readlink "%{lib-dir}/libc++.dylib" | grep "libc++.1.dylib"
diff --git a/libcxxabi/test/vendor/llvm/system-install-properties.sh.cpp b/libcxxabi/test/vendor/llvm/system-install-properties.sh.cpp
new file mode 100644
index 0000000000000..b6d32a3d544a6
--- /dev/null
+++ b/libcxxabi/test/vendor/llvm/system-install-properties.sh.cpp
@@ -0,0 +1,25 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+// REQUIRES: stdlib=libc++ && !stdlib=apple-libc++
+
+// This file checks various properties of the installation of libc++abi when built under
+// a vanilla upstream configuration.
+
+// Make sure we install the libc++abi headers in the right location.
+//
+// RUN: stat "%{include}/cxxabi.h"
+
+// Make sure we install libc++abi.1.dylib in the right location.
+//
+// RUN: stat "%{lib}/libc++abi.1.dylib"
+
+// Make sure we install a symlink from libc++abi.dylib to libc++abi.1.dylib.
+//
+// RUN: stat "%{lib-dir}/libc++abi.dylib"
+// RUN: readlink "%{lib-dir}/libc++abi.dylib" | grep "libc++abi.1.dylib"

@ldionne ldionne force-pushed the review/add-llvm-vendor-properties-test branch from c0d2532 to 6a910ba Compare July 12, 2024 14:30
@ldionne ldionne force-pushed the review/add-llvm-vendor-properties-test branch from a91e55d to 6c5ef52 Compare October 24, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++abi libc++abi C++ Runtime Library. Not libc++. libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants