Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c01ad7b3 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Prepare for clang+mingw windows builds

Use $(prefix)CLANG_SUPPORTED from Soong to control whether to use clang
for host builds or not. It's fairly general, but I only expect it to be
used to so that Windows builds can be switched between GCC and Clang
with a single switch.

Also separate native-host-cross from native-host so that it's easier to
build all possible windows modules.

Bug: 69933068
Test: m native-host-cross
Test: switch clang on and off, grep w64.*g++ out/build-aosp_arm.ninja
Change-Id: I205c5bc6739b72a539ece935381107ec1dd5bd48
parent 25c73e91
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -667,7 +667,7 @@ endif


ifdef j_or_n
$(j_or_n) $(h_or_t) $(j_or_n)-$(h_or_t) : $(my_checked_module)
$(j_or_n) $(h_or_t) $(j_or_n)-$(h_or_hc_or_t) : $(my_checked_module)
ifneq (,$(filter $(my_module_tags),tests))
$(j_or_n)-$(h_or_t)-tests $(j_or_n)-tests $(h_or_t)-tests : $(my_checked_module)
endif
+2 −2
Original line number Diff line number Diff line
@@ -387,9 +387,9 @@ endif
# clang is enabled by default for host builds
# enable it unless we've specifically disabled clang above
ifdef LOCAL_IS_HOST_MODULE
    ifeq ($($(my_prefix)OS),windows)
    ifneq ($($(my_prefix)CLANG_SUPPORTED),true)
        ifeq ($(my_clang),true)
            $(error $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): Clang is not yet supported for windows binaries)
            $(call pretty-error,Clang is not yet supported for $($(my_prefix)OS) binaries)
        endif
        my_clang := false
    else