File tree Expand file tree Collapse file tree
secondary/llvm/lib/Transforms/IPO Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ def main():
5353 if key in values :
5454 print ('duplicate key "%s" in args' % key , file = sys .stderr )
5555 return 1
56+ if val .startswith ("@file:" ):
57+ file_path = val [len ("@file:" ):]
58+ with open (file_path ) as f :
59+ val = f .read ()
5660 values [key ] = val .replace ("\\ n" , "\n " )
5761 unused_values = set (values .keys ())
5862
Original file line number Diff line number Diff line change 1+ import (" //llvm/utils/gn/build/write_cmake_config.gni" )
2+
3+ write_cmake_config (" write_instrumentor_variables" ) {
4+ input = " //llvm/include/llvm/Transforms/IPO/InstrumentorVariables.inc.in"
5+ output =
6+ " $root_gen_dir /llvm/include/llvm/Transforms/IPO/InstrumentorVariables.inc"
7+ values =
8+ [ " LLVM_INSTRUMENTOR_RUNTIME_HELPER=@file:" +
9+ rebase_path (
10+ " //llvm/include/llvm/Transforms/IPO/InstrumentorRuntimeHelper.h" ,
11+ root_build_dir ) ]
12+ }
13+
114static_library (" IPO" ) {
215 output_name = " LLVMipo"
316 deps = [
17+ " :write_instrumentor_variables" ,
418 " //llvm/lib/Analysis" ,
519 " //llvm/lib/Bitcode/Reader" ,
620 " //llvm/lib/Bitcode/Writer" ,
You can’t perform that action at this time.
0 commit comments