File tree Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Expand file tree Collapse file tree 4 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ FEATURE_DISPLAY ?= \
136
136
libunwind \
137
137
libdw-dwarf-unwind \
138
138
libcapstone \
139
- llvm \
139
+ llvm-perf \
140
140
zlib \
141
141
lzma \
142
142
get_cpuid \
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ FILES= \
73
73
test-libopencsd.bin \
74
74
test-clang.bin \
75
75
test-llvm.bin \
76
+ test-llvm-perf.bin \
76
77
test-llvm-version.bin \
77
78
test-libaio.bin \
78
79
test-libzstd.bin \
@@ -388,6 +389,14 @@ $(OUTPUT)test-llvm.bin:
388
389
$(shell $(LLVM_CONFIG ) --system-libs) \
389
390
> $(@:.bin=.make.output ) 2>&1
390
391
392
+ $(OUTPUT ) test-llvm-perf.bin :
393
+ $(BUILDXX ) -std=gnu++17 \
394
+ -I$(shell $(LLVM_CONFIG ) --includedir) \
395
+ -L$(shell $(LLVM_CONFIG ) --libdir) \
396
+ $(shell $(LLVM_CONFIG ) --libs Core BPF) \
397
+ $(shell $(LLVM_CONFIG ) --system-libs) \
398
+ > $(@:.bin=.make.output ) 2>&1
399
+
391
400
$(OUTPUT ) test-llvm-version.bin :
392
401
$(BUILDXX ) -std=gnu++17 \
393
402
-I$(shell $(LLVM_CONFIG ) --includedir) \
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: GPL-2.0
2
+ #include " llvm/Support/ManagedStatic.h"
3
+ #include " llvm/Support/raw_ostream.h"
4
+
5
+ #if LLVM_VERSION_MAJOR < 13
6
+ # error "Perf requires llvm-devel/llvm-dev version 13 or greater"
7
+ #endif
8
+
9
+ int main ()
10
+ {
11
+ llvm::errs () << " Hello World!\n " ;
12
+ llvm::llvm_shutdown ();
13
+ return 0 ;
14
+ }
Original file line number Diff line number Diff line change @@ -981,8 +981,8 @@ ifdef BUILD_NONDISTRO
981
981
endif
982
982
983
983
ifndef NO_LIBLLVM
984
- $(call feature_check,llvm)
985
- ifeq ($(feature-llvm), 1)
984
+ $(call feature_check,llvm-perf )
985
+ ifeq ($(feature-llvm-perf ), 1)
986
986
CFLAGS += -DHAVE_LIBLLVM_SUPPORT
987
987
CFLAGS += $(shell $(LLVM_CONFIG) --cflags)
988
988
CXXFLAGS += -DHAVE_LIBLLVM_SUPPORT
@@ -992,7 +992,7 @@ ifndef NO_LIBLLVM
992
992
EXTLIBS += -lstdc++
993
993
$(call detected,CONFIG_LIBLLVM)
994
994
else
995
- $(warning No libllvm found, slower source file resolution, please install llvm-devel/llvm-dev)
995
+ $(warning No libllvm 13+ found, slower source file resolution, please install llvm-devel/llvm-dev)
996
996
NO_LIBLLVM := 1
997
997
endif
998
998
endif
You can’t perform that action at this time.
0 commit comments