summaryrefslogtreecommitdiff
path: root/tools/build
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2023-10-30 13:39:28 -0700
committerNamhyung Kim <namhyung@kernel.org>2023-10-30 13:46:27 -0700
commitfed3a1be6433e15833068c701bfde7b422d8b988 (patch)
treeb67a9c17a025004c73d75424808654a224e212e4 /tools/build
parentc43c64f8a1c68da370bf8d458ba52e24183a5264 (diff)
parent4fa008a2db484024a5cb52676a1b1534dc82330c (diff)
Merge tag 'perf-tools-fixes-for-v6.6-2-2023-10-20' into perf-tools-next
To get the latest fixes in the perf tools including perf stat output, dlfilter and LLVM feature detection. Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/build')
-rw-r--r--tools/build/feature/test-llvm.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/build/feature/test-llvm.cpp b/tools/build/feature/test-llvm.cpp
new file mode 100644
index 000000000000..88a3d1bdd9f6
--- /dev/null
+++ b/tools/build/feature/test-llvm.cpp
@@ -0,0 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/raw_ostream.h"
+#define NUM_VERSION (((LLVM_VERSION_MAJOR) << 16) + (LLVM_VERSION_MINOR << 8) + LLVM_VERSION_PATCH)
+
+#if NUM_VERSION < 0x030900
+# error "LLVM version too low"
+#endif
+int main()
+{
+ llvm::errs() << "Hello World!\n";
+ llvm::llvm_shutdown();
+ return 0;
+}