Skip to content

Commit

Permalink
llvm: allow cleaning LLVM's Visual Studio builds
Browse files Browse the repository at this point in the history
The Visual Studio generators create a `clean` target that we can use.
  • Loading branch information
mathstuf committed Jul 8, 2016
1 parent 1bcd606 commit b9a3590
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mk/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions mk/rt.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b9a3590

Please sign in to comment.