From 38e07f1baf5476ef8e5902eb4d93571e62c0d4d3 Mon Sep 17 00:00:00 2001 From: Alix Espino Date: Wed, 14 Sep 2022 19:10:51 +0000 Subject: [PATCH] Revert "Revert "Default BuildBrokenClangCFlags & BuildBrokenCla..." Revert^2 "deletion of clang_cflags & clang_asflags from Soong" e9a6865bc7c51028ed348f6d1c6b975ee8b98837 Test: Treehugger Change-Id: Ibda75c075d0d88f2c11fd10722c9a74481ee965a --- Changes.md | 21 +++++++++++++++++++++ core/board_config.mk | 2 ++ core/soong_config.mk | 4 +++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Changes.md b/Changes.md index 27e52f2630..3ad26417b2 100644 --- a/Changes.md +++ b/Changes.md @@ -827,6 +827,27 @@ go run bpmodify.go -w -m=module_name -remove-property=true -property=clang filep ``` `BUILD_BROKEN_CLANG_PROPERTY` can be used as temporarily workaround + + +### Stop using clang_cflags and clang_asflags + +clang_cflags and clang_asflags are deprecated. +To fix any build errors, use bpmodify to either + - move the contents of clang_asflags/clang_cflags into asflags/cflags or + - delete clang_cflags/as_flags as necessary + +To Move the contents: +``` make +go run bpmodify.go -w -m=module_name -move-property=true -property=clang_cflags -new-location=cflags filepath +``` + +To Delete: +``` make +go run bpmodify.go -w -m=module_name -remove-property=true -property=clang_cflags filepath +``` + +`BUILD_BROKEN_CLANG_ASFLAGS` and `BUILD_BROKEN_CLANG_CFLAGS` can be used as temporarily workarounds + ### Other envsetup.sh variables {#other_envsetup_variables} * ANDROID_TOOLCHAIN diff --git a/core/board_config.mk b/core/board_config.mk index 0fda480eab..88516fae03 100644 --- a/core/board_config.mk +++ b/core/board_config.mk @@ -175,6 +175,8 @@ _board_strip_list += ODM_MANIFEST_SKUS _build_broken_var_list := \ BUILD_BROKEN_CLANG_PROPERTY \ + BUILD_BROKEN_CLANG_ASFLAGS \ + BUILD_BROKEN_CLANG_CFLAGS \ BUILD_BROKEN_DEPFILE \ BUILD_BROKEN_DUP_RULES \ BUILD_BROKEN_DUP_SYSPROP \ diff --git a/core/soong_config.mk b/core/soong_config.mk index 2ff064a408..b000df6f9c 100644 --- a/core/soong_config.mk +++ b/core/soong_config.mk @@ -275,7 +275,9 @@ $(call add_json_str, PrebuiltHiddenApiDir, $(BOARD_PREBUILT_HIDDENAPI_DIR)) $(call add_json_str, ShippingApiLevel, $(PRODUCT_SHIPPING_API_LEVEL)) -$(call add_json_bool, BuildBrokenClangProperty, $(filter true,$(BUILD_BROKEN_CLANG_PROPERTY))) +$(call add_json_bool, BuildBrokenClangProperty, $(filter true,$(BUILD_BROKEN_CLANG_PROPERTY))) +$(call add_json_bool, BuildBrokenClangAsFlags, $(filter true,$(BUILD_BROKEN_CLANG_ASFLAGS))) +$(call add_json_bool, BuildBrokenClangCFlags, $(filter true,$(BUILD_BROKEN_CLANG_CFLAGS))) $(call add_json_bool, BuildBrokenDepfile, $(filter true,$(BUILD_BROKEN_DEPFILE))) $(call add_json_bool, BuildBrokenEnforceSyspropOwner, $(filter true,$(BUILD_BROKEN_ENFORCE_SYSPROP_OWNER))) $(call add_json_bool, BuildBrokenTrebleSyspropNeverallow, $(filter true,$(BUILD_BROKEN_TREBLE_SYSPROP_NEVERALLOW)))