diff options
author | Victor Chong <victor.chong@linaro.org> | 2020-04-21 08:40:38 +0100 |
---|---|---|
committer | Jérôme Forissier <jerome@forissier.org> | 2020-04-21 11:27:55 +0200 |
commit | c12b5608105bef466586dff35f7b1f4b9aa3c9a1 (patch) | |
tree | be6770c61387337c76965d687f8b02602505a926 | |
parent | 11fa71b9ddb429088f325cfda430183003ccd1db (diff) |
mk: clang.mk: use 'clang -E' instead of clang-cpp
AOSP's prebuilt versions of Clang [1] don't contain the clang-cpp
symlink to clang, so use the equivalent command of 'clang -E' instead.
LINK: [1] https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/heads/master
LINK: [2] https://github.com/llvm/llvm-project/tree/llvmorg-9.0.1
LINK: [3] https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/refs/heads/master/clang-r370808/bin/clang
Suggested by: Jerome Forissier <jerome@forissier.org>
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Tested-by: Victor Chong <victor.chong@linaro.org> (builds only with
clang-v9.0.1 [2] and AOSP clang v10.0.1 [3])
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r-- | mk/clang.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mk/clang.mk b/mk/clang.mk index 0b780113..cdff9b7f 100644 --- a/mk/clang.mk +++ b/mk/clang.mk @@ -7,7 +7,9 @@ clang-target := $(patsubst %-,%,$(notdir $(lastword $(CROSS_COMPILE_$(sm))))) ccache-cmd := $(if $(findstring ccache,$(CROSS_COMPILE_$(sm))),$(firstword $(CROSS_COMPILE_$(sm))) ,) CC$(sm) := $(ccache-cmd)clang --target=$(clang-target) -CPP$(sm) := $(ccache-cmd)clang-cpp --target=$(clang-target) +# Due to the absence of clang-cpp in AOSP's prebuilt version of clang, +# use the equivalent command of 'clang -E' +CPP$(sm) := $(ccache-cmd)clang --target=$(clang-target) -E LD$(sm) := $(ccache-cmd)ld.lld ifeq ($(sm)-$(CFG_WITH_PAGER),core-y) |