llvm: allow cleaning LLVM's Visual Studio builds

The Visual Studio generators create a `clean` target that we can use.
This commit is contained in:
Ben Boeckel 2016-07-01 20:19:23 -04:00
parent 1bcd60682d
commit b9a35902a2
2 changed files with 11 additions and 0 deletions

View File

@ -59,6 +59,10 @@ clean-llvm$(1):
$$(Q)$$(CFG_NINJA) -C $$(CFG_LLVM_BUILD_DIR_$(1)) -t clean
else ifeq ($$(findstring msvc,$(1)),msvc)
clean-llvm$(1):
@$$(call E, clean: llvm)
$$(Q)$$(CFG_CMAKE) --build $$(CFG_LLVM_BUILD_DIR_$(1)) \
--config $$(LLVM_BUILD_CONFIG_MODE) \
--target clean
else
clean-llvm$(1):
@$$(call E, clean: llvm)

View File

@ -350,10 +350,17 @@ $$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD
$$(COMPRT_DEFINES_$(1)) \
$$(COMPRT_BUILD_CC_$(1)) \
-G"$$(CFG_CMAKE_GENERATOR)"
ifneq ($$(CFG_NINJA),)
$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
--target $$(COMPRT_BUILD_TARGET_$(1)) \
--config $$(LLVM_BUILD_CONFIG_MODE) \
-- $$(COMPRT_BUILD_ARGS_$(1))
else
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
--target $$(COMPRT_BUILD_TARGET_$(1)) \
--config $$(LLVM_BUILD_CONFIG_MODE) \
-- $$(COMPRT_BUILD_ARGS_$(1)) $$(MFLAGS)
endif
$$(Q)cp "$$(COMPRT_OUTPUT_$(1))" $$@
endif