forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gn build] Add build files for bugpoint-passes and LLVMHello plugins
These two plugins are loaded into a host process that contains all LLVM symbols, so they don't link against anything. This required minor readjustments to the tablegen() setup of IR. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56204 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350234 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
70 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
assert(host_os != "win", "loadable modules not supported on win") | ||
|
||
loadable_module("Hello") { | ||
output_name = "LLVMHello" | ||
deps = [ | ||
# LLVMHello doesn't want to link in any LLVM code, it just | ||
# needs its headers. | ||
"//llvm/include/llvm/IR:public_tablegen", | ||
] | ||
sources = [ | ||
"Hello.cpp", | ||
] | ||
|
||
if (host_os == "linux") { | ||
# The GN build currently doesn't globally pass -fPIC, but that's | ||
# needed for building .so files on Linux. Just pass it manually | ||
# for loadable_modules for now. | ||
cflags = [ "-fPIC" ] | ||
} | ||
|
||
# FIXME: Use Hello.exports to remove all exports. | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
assert(host_os != "win", "loadable modules not supported on win") | ||
|
||
loadable_module("bugpoint-passes") { | ||
output_name = "BugpointPasses" | ||
deps = [ | ||
# BugpointPasses doesn't want to link in any LLVM code, it just | ||
# needs its headers. | ||
"//llvm/include/llvm/IR:public_tablegen", | ||
] | ||
sources = [ | ||
"TestPasses.cpp", | ||
] | ||
|
||
if (host_os == "linux") { | ||
# The GN build currently doesn't globally pass -fPIC, but that's | ||
# needed for building .so files on Linux. Just pass it manually | ||
# for loadable_modules for now. | ||
cflags = [ "-fPIC" ] | ||
} | ||
|
||
# FIXME: Use bugpoint.exports to remove all exports. | ||
} |