aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc/buildfile
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-11-22 08:22:49 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-11-22 08:22:49 +0200
commitc8d9235115f5c0c3b20bdb0cf59b05761cb3d3de (patch)
tree8eb09513625a157e1c436c4e156b1c87f0506c44 /libbuild2/cc/buildfile
parent9bb8b63156f6dfb42f9ddab77f253ae0bda02d5a (diff)
Add support for `import std` in Clang 17 or later with libc++
Diffstat (limited to 'libbuild2/cc/buildfile')
-rw-r--r--libbuild2/cc/buildfile14
1 files changed, 12 insertions, 2 deletions
diff --git a/libbuild2/cc/buildfile b/libbuild2/cc/buildfile
index e090e76..7dcd811 100644
--- a/libbuild2/cc/buildfile
+++ b/libbuild2/cc/buildfile
@@ -18,12 +18,22 @@ intf_libs = ../bin/lib{build2-bin}
./: lib{build2-cc}: libul{build2-cc}: \
{hxx ixx txx cxx}{** -pkgconfig-lib* -**.test...} \
- h{msvc-setup} \
- $intf_libs $impl_libs
+ h{msvc-setup}
libul{build2-cc}: cxx{pkgconfig-libpkgconf}: include = $libpkgconf
libul{build2-cc}: cxx{pkgconfig-libpkg-config}: include = (!$libpkgconf)
+libul{build2-cc}: $intf_libs $impl_libs
+
+# libc++ std module interface translation unit.
+#
+# Hopefully temporary, see llvm-project GH issues #73089.
+#
+# @@ TMP: make sure sync'ed with upstream before release (keep this note).
+#
+lib{build2-cc}: file{std.cppm}
+file{std.cppm}@./: install = data/libbuild2/cc/
+
# Unit tests.
#
exe{*.test}: