diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | Makefile.rules | 2 | ||||
-rw-r--r-- | lib/Target/LLVMBuild.txt | 5 | ||||
-rw-r--r-- | utils/llvm-build/llvmbuild/main.py | 14 |
4 files changed, 17 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 77cd5fa..5d36f5f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,6 +236,8 @@ set(LLVMBUILDCMAKEFRAG message(STATUS "Constructing LLVMBuild project information") execute_process( COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL} + --native-target "${LLVM_NATIVE_ARCH}" + --enable-targets "${LLVM_TARGETS_TO_BUILD}" --write-library-table ${LLVMCONFIGLIBRARYDEPENDENCIESINC} --write-cmake-fragment ${LLVMBUILDCMAKEFRAG} ERROR_VARIABLE LLVMBUILDOUTPUT diff --git a/Makefile.rules b/Makefile.rules index e82549d..78d1f97 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -92,6 +92,8 @@ LLVMConfigLibraryDependenciesInc := \ $(LLVMBuildMakeFrag): $(PROJ_SRC_ROOT)/Makefile.rules $(Echo) Constructing LLVMBuild project information. $(Verb) $(LLVMBuildTool) \ + --native-target "$(ARCH)" \ + --enable-targets "$(TARGETS_TO_BUILD)" \ --write-library-table $(LLVMConfigLibraryDependenciesInc) \ --write-make-fragment $(LLVMBuildMakeFrag) diff --git a/lib/Target/LLVMBuild.txt b/lib/Target/LLVMBuild.txt index 09dadd6..60f5230 100644 --- a/lib/Target/LLVMBuild.txt +++ b/lib/Target/LLVMBuild.txt @@ -21,8 +21,9 @@ name = Target parent = Libraries required_libraries = Core MC Support -; This is a convenient group we define (and expect targets to add to) which -; makes it easy for tools to include every target. +; This is a special group whose required libraries are extended (by llvm-build) +; with every built target, which makes it easy for tools to include every +; target. [component_1] type = LibraryGroup name = all-targets diff --git a/utils/llvm-build/llvmbuild/main.py b/utils/llvm-build/llvmbuild/main.py index fe852a0..51923eb 100644 --- a/utils/llvm-build/llvmbuild/main.py +++ b/utils/llvm-build/llvmbuild/main.py @@ -505,7 +505,7 @@ def add_magic_target_components(parser, project, opts): determined based on the target configuration options. This currently is responsible for populating the required_libraries list of - the "Native", "NativeCodeGen", and "Engine" components. + the "all-targets", "Native", "NativeCodeGen", and "Engine" components. """ # Determine the available targets. @@ -536,8 +536,14 @@ def add_magic_target_components(parser, project, opts): if opts.enable_targets is None: enable_targets = available_targets.values() else: + # We support both space separated and semi-colon separated lists. + if ' ' in opts.enable_targets: + enable_target_names = opts.enable_targets.split() + else: + enable_target_names = opts.enable_targets.split(';') + enable_targets = [] - for name in opts.enable_targets.split(): + for name in enable_target_names: target = available_targets.get(name) if target is None: parser.error("invalid target to enable: %r (not in project)" % ( @@ -641,8 +647,8 @@ def main(): action="store", default=None) group.add_option("", "--enable-targets", dest="enable_targets", metavar="NAMES", - help=("Enable the given space separated list of targets, " - "or all targets if not present"), + help=("Enable the given space or semi-colon separated " + "list of targets, or all targets if not present"), action="store", default=None) parser.add_option_group(group) |