diff --git a/clang/Makefile b/clang/Makefile index 2ffe3597a96f..cb2566a0a17d 100644 --- a/clang/Makefile +++ b/clang/Makefile @@ -28,8 +28,7 @@ ifeq ($(MAKECMDGOALS),libs-only) OPTIONAL_DIRS := endif ifeq ($(BUILD_CLANG_ONLY),YES) - DIRS := $(filter-out tools docs unittests, $(DIRS)) \ - tools/driver tools/libclang + DIRS := $(filter-out docs unittests, $(DIRS)) OPTIONAL_DIRS := endif diff --git a/clang/tools/Makefile b/clang/tools/Makefile index e7aa2fa4ffa0..b2a9f36f8e0b 100644 --- a/clang/tools/Makefile +++ b/clang/tools/Makefile @@ -17,4 +17,9 @@ DIRS := driver libclang c-index-test arcmt-test c-arcmt-test diagtool \ # Recurse into the extra repository of tools if present. OPTIONAL_DIRS := extra +ifeq ($(BUILD_CLANG_ONLY),YES) + DIRS := tools/driver tools/libclang + OPTIONAL_DIRS := +endif + include $(CLANG_LEVEL)/Makefile