Loading llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn +18 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,21 @@ import("//llvm/utils/gn/build/write_vcsrevision.gni") write_vcsrevision("write_vcsrevision") { header = "$target_gen_dir/VCSRevision.h" } # Corresponds to process_llvm_pass_plugins() in the CMake build. # For now, just turn everything off. # If we ever add real support for this, the GN way for this is probably # to have a declare_args() list with plugin names that people can override # in their args.gn and with empty defaults (similar to llvm_targets_to_build). action("write_extension_def") { script = "//llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py" outputs = [ "$target_gen_dir/Extension.def", ] # If any extensions should be enabled, they'd be passed as additional # arguments, e.g. `args += [ "Bye", "Polly" ]`. args = [ "-o", rebase_path(outputs[0], root_build_dir), ] } llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py 0 → 100755 +22 −0 Original line number Diff line number Diff line #!/usr/bin/env python from __future__ import print_function import argparse import os import sys def main(): parser = argparse.ArgumentParser() parser.add_argument('exts', nargs='*', help='list of supported extensions') parser.add_argument('-o', '--output', required=True, help='output file') args = parser.parse_args() output = ''.join(['HANDLE_EXTENSION(%s)\n' % ext for ext in args.exts]) if not os.path.exists(args.output) or open(args.output).read() != output: open(args.output, 'w').write(output) if __name__ == '__main__': sys.exit(main()) llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn +3 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ static_library("Support") { # public_dep because public header TargetSelect.h includes these .def files. "//llvm/include/llvm/Config:write_target_def_files", # public_dep because random targets assume its output exists. "//llvm/include/llvm/Support:write_extension_def", ] include_dirs = [ "Unix", Loading Loading
llvm/utils/gn/secondary/llvm/include/llvm/Support/BUILD.gn +18 −0 Original line number Diff line number Diff line Loading @@ -3,3 +3,21 @@ import("//llvm/utils/gn/build/write_vcsrevision.gni") write_vcsrevision("write_vcsrevision") { header = "$target_gen_dir/VCSRevision.h" } # Corresponds to process_llvm_pass_plugins() in the CMake build. # For now, just turn everything off. # If we ever add real support for this, the GN way for this is probably # to have a declare_args() list with plugin names that people can override # in their args.gn and with empty defaults (similar to llvm_targets_to_build). action("write_extension_def") { script = "//llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py" outputs = [ "$target_gen_dir/Extension.def", ] # If any extensions should be enabled, they'd be passed as additional # arguments, e.g. `args += [ "Bye", "Polly" ]`. args = [ "-o", rebase_path(outputs[0], root_build_dir), ] }
llvm/utils/gn/secondary/llvm/include/llvm/Support/write_extension_def.py 0 → 100755 +22 −0 Original line number Diff line number Diff line #!/usr/bin/env python from __future__ import print_function import argparse import os import sys def main(): parser = argparse.ArgumentParser() parser.add_argument('exts', nargs='*', help='list of supported extensions') parser.add_argument('-o', '--output', required=True, help='output file') args = parser.parse_args() output = ''.join(['HANDLE_EXTENSION(%s)\n' % ext for ext in args.exts]) if not os.path.exists(args.output) or open(args.output).read() != output: open(args.output, 'w').write(output) if __name__ == '__main__': sys.exit(main())
llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn +3 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,9 @@ static_library("Support") { # public_dep because public header TargetSelect.h includes these .def files. "//llvm/include/llvm/Config:write_target_def_files", # public_dep because random targets assume its output exists. "//llvm/include/llvm/Support:write_extension_def", ] include_dirs = [ "Unix", Loading