File tree Expand file tree Collapse file tree 4 files changed +45
-0
lines changed
llvm/utils/gn/secondary/llvm Expand file tree Collapse file tree 4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ static_library("Target") {
3939 " //llvm/include/llvm/Config:write_target_def_files" ,
4040 ]
4141 sources = [
42+ " RegisterTargetPassConfigCallback.cpp" ,
4243 " Target.cpp" ,
4344 " TargetLoweringObjectFile.cpp" ,
4445 " TargetMachine.cpp" ,
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ group("unittests") {
1010 " Bitstream:BitstreamTests" ,
1111 " CGData:CodeGenDataTests" ,
1212 " CodeGen:CodeGenTests" ,
13+
14+ # FIXME: Figure out how to make pass.
15+ # "CodeGen/CGPluginTest",
1316 " CodeGen/GlobalISel:GlobalISelTests" ,
1417 " DWARFLinkerParallel:DWARFLinkerParallelTests" ,
1518 " DebugInfo/BTF:DebugInfoBTFTests" ,
Original file line number Diff line number Diff line change 1+ import (" //third-party/unittest/unittest.gni" )
2+
3+ unittest (" CGPluginTest" ) {
4+ deps = [
5+ " Plugin:CGTestPlugin" ,
6+ " //llvm/lib/IR" ,
7+ " //llvm/lib/MC" ,
8+ " //llvm/lib/Support" ,
9+ " //llvm/lib/Target" ,
10+ " //llvm/lib/Target:TargetsToBuild" ,
11+ " //llvm/lib/TargetParser" ,
12+ " //llvm/lib/Testing/Support" ,
13+ ]
14+ sources = [
15+ " PluginTest.cpp" ,
16+ " Plugin/CodeGenTestPass.cpp" ,
17+ ]
18+
19+ # Support plugins.
20+ # FIXME: Disable dead stripping once other binaries are dead-stripped.
21+ if (host_os != " mac" && host_os != " win" ) {
22+ # Corresponds to export_executable_symbols() in cmake.
23+ ldflags = [ " -rdynamic" ]
24+ }
25+ }
Original file line number Diff line number Diff line change 1+ loadable_module (" CGTestPlugin" ) {
2+ # Put plugin next to the unit test executable.
3+ output_dir = " $target_out_dir /.."
4+
5+ sources = [
6+ " Plugin.cpp" ,
7+ " CodeGenTestPass.cpp" ,
8+ ]
9+
10+ if (host_os != " mac" && host_os != " win" ) {
11+ # The GN build currently doesn't globally pass -fPIC, but that's
12+ # needed for building .so files on ELF. Just pass it manually
13+ # for loadable_modules for now.
14+ cflags = [ " -fPIC" ]
15+ }
16+ }
You can’t perform that action at this time.
0 commit comments