forked from openkylin/platform_build
Mark (BUILD_|LOCAL_)COPY_HEADERS as [more] deprecated
We've considered these deprecated for a while, and have reduced where they may be used, but let's actually throw warnings and call them out specifically now. Bug: 130719878 Test: lunch aosp_arm; m nothing [see no warnings] Test: lunch aosp_crosshatch; m nothing [see LOCAL_COPY_HEADERS warnings] Test: lunch aosp_taimen; m nothing [see BUILD_COPY_HEADERS warnings] Change-Id: I8c12012366d84667de0d223bbde38d8b90419e36
This commit is contained in:
parent
15e0680af1
commit
66d21d4a30
10
Changes.md
10
Changes.md
|
@ -1,5 +1,14 @@
|
||||||
# Build System Changes for Android.mk Writers
|
# Build System Changes for Android.mk Writers
|
||||||
|
|
||||||
|
## COPY_HEADERS usage now produces warnings {#copy_headers}
|
||||||
|
|
||||||
|
We've considered `BUILD_COPY_HEADERS`/`LOCAL_COPY_HEADERS` to be deprecated for
|
||||||
|
a long time, and the places where it's been able to be used have shrinked over
|
||||||
|
the last several releases. Equivalent functionality is not available in Soong.
|
||||||
|
|
||||||
|
See the [build/soong/docs/best_practices.md#headers] for more information about
|
||||||
|
how best to handle headers in Android.
|
||||||
|
|
||||||
## `m4` is not available on `$PATH`
|
## `m4` is not available on `$PATH`
|
||||||
|
|
||||||
There is a prebuilt of it available in prebuilts/build-tools, and a make
|
There is a prebuilt of it available in prebuilts/build-tools, and a make
|
||||||
|
@ -553,6 +562,7 @@ version.
|
||||||
|
|
||||||
|
|
||||||
[build/soong/Changes.md]: https://android.googlesource.com/platform/build/soong/+/master/Changes.md
|
[build/soong/Changes.md]: https://android.googlesource.com/platform/build/soong/+/master/Changes.md
|
||||||
|
[build/soong/docs/best_practices.md#headers]: https://android.googlesource.com/platform/build/soong/+/master/docs/best_practices.md#headers
|
||||||
[external/fonttools/Lib/fontTools/Android.bp]: https://android.googlesource.com/platform/external/fonttools/+/master/Lib/fontTools/Android.bp
|
[external/fonttools/Lib/fontTools/Android.bp]: https://android.googlesource.com/platform/external/fonttools/+/master/Lib/fontTools/Android.bp
|
||||||
[frameworks/base/Android.bp]: https://android.googlesource.com/platform/frameworks/base/+/master/Android.bp
|
[frameworks/base/Android.bp]: https://android.googlesource.com/platform/frameworks/base/+/master/Android.bp
|
||||||
[frameworks/base/data/fonts/Android.mk]: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/Android.mk
|
[frameworks/base/data/fonts/Android.mk]: https://android.googlesource.com/platform/frameworks/base/+/master/data/fonts/Android.mk
|
||||||
|
|
|
@ -16,6 +16,7 @@ have any problems converting, please contact us via:
|
||||||
| -------------------------------- | --------- |
|
| -------------------------------- | --------- |
|
||||||
| `BUILD_AUX_EXECUTABLE` | Error |
|
| `BUILD_AUX_EXECUTABLE` | Error |
|
||||||
| `BUILD_AUX_STATIC_LIBRARY` | Error |
|
| `BUILD_AUX_STATIC_LIBRARY` | Error |
|
||||||
|
| `BUILD_COPY_HEADERS` | Warning |
|
||||||
| `BUILD_HOST_FUZZ_TEST` | Error |
|
| `BUILD_HOST_FUZZ_TEST` | Error |
|
||||||
| `BUILD_HOST_NATIVE_TEST` | Error |
|
| `BUILD_HOST_NATIVE_TEST` | Error |
|
||||||
| `BUILD_HOST_SHARED_LIBRARY` | Warning |
|
| `BUILD_HOST_SHARED_LIBRARY` | Warning |
|
||||||
|
|
|
@ -621,11 +621,15 @@ endif
|
||||||
###########################################
|
###########################################
|
||||||
# Handle BUILD_BROKEN_USES_BUILD_*
|
# Handle BUILD_BROKEN_USES_BUILD_*
|
||||||
|
|
||||||
$(foreach m,$(DEFAULT_WARNING_BUILD_MODULE_TYPES),\
|
$(foreach m,$(filter-out BUILD_COPY_HEADERS,$(DEFAULT_WARNING_BUILD_MODULE_TYPES)),\
|
||||||
$(if $(filter false,$(BUILD_BROKEN_USES_$(m))),\
|
$(if $(filter false,$(BUILD_BROKEN_USES_$(m))),\
|
||||||
$(KATI_obsolete_var $(m),Please convert to Soong),\
|
$(KATI_obsolete_var $(m),Please convert to Soong),\
|
||||||
$(KATI_deprecated_var $(m),Please convert to Soong)))
|
$(KATI_deprecated_var $(m),Please convert to Soong)))
|
||||||
|
|
||||||
|
$(if $(filter false,$(BUILD_BROKEN_USES_BUILD_COPY_HEADERS)),\
|
||||||
|
$(KATI_obsolete_var BUILD_COPY_HEADERS,See $(CHANGES_URL)#copy_headers),\
|
||||||
|
$(KATI_deprecated_var BUILD_COPY_HEADERS,See $(CHANGES_URL)#copy_headers))
|
||||||
|
|
||||||
$(foreach m,$(DEFAULT_ERROR_BUILD_MODULE_TYPES),\
|
$(foreach m,$(DEFAULT_ERROR_BUILD_MODULE_TYPES),\
|
||||||
$(if $(filter true,$(BUILD_BROKEN_USES_$(m))),\
|
$(if $(filter true,$(BUILD_BROKEN_USES_$(m))),\
|
||||||
$(KATI_deprecated_var $(m),Please convert to Soong),\
|
$(KATI_deprecated_var $(m),Please convert to Soong),\
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
# These module types can still be used without warnings or errors.
|
# These module types can still be used without warnings or errors.
|
||||||
AVAILABLE_BUILD_MODULE_TYPES :=$= \
|
AVAILABLE_BUILD_MODULE_TYPES :=$= \
|
||||||
BUILD_COPY_HEADERS \
|
|
||||||
BUILD_EXECUTABLE \
|
BUILD_EXECUTABLE \
|
||||||
BUILD_FUZZ_TEST \
|
BUILD_FUZZ_TEST \
|
||||||
BUILD_HEADER_LIBRARY \
|
BUILD_HEADER_LIBRARY \
|
||||||
|
@ -26,6 +25,7 @@ AVAILABLE_BUILD_MODULE_TYPES :=$= \
|
||||||
# relevant BUILD_BROKEN_USES_BUILD_* variables, then these would move to
|
# relevant BUILD_BROKEN_USES_BUILD_* variables, then these would move to
|
||||||
# DEFAULT_ERROR_BUILD_MODULE_TYPES.
|
# DEFAULT_ERROR_BUILD_MODULE_TYPES.
|
||||||
DEFAULT_WARNING_BUILD_MODULE_TYPES :=$= \
|
DEFAULT_WARNING_BUILD_MODULE_TYPES :=$= \
|
||||||
|
BUILD_COPY_HEADERS \
|
||||||
BUILD_HOST_SHARED_LIBRARY \
|
BUILD_HOST_SHARED_LIBRARY \
|
||||||
BUILD_HOST_STATIC_LIBRARY \
|
BUILD_HOST_STATIC_LIBRARY \
|
||||||
|
|
||||||
|
|
|
@ -37,4 +37,7 @@ my_module_arch_supported :=
|
||||||
###########################################################
|
###########################################################
|
||||||
## Copy headers to the install tree
|
## Copy headers to the install tree
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_COPY_HEADERS)
|
ifdef LOCAL_COPY_HEADERS
|
||||||
|
$(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers)
|
||||||
|
include $(BUILD_SYSTEM)/copy_headers.mk
|
||||||
|
endif
|
||||||
|
|
|
@ -37,4 +37,7 @@ my_module_arch_supported :=
|
||||||
###########################################################
|
###########################################################
|
||||||
## Copy headers to the install tree
|
## Copy headers to the install tree
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_COPY_HEADERS)
|
ifdef LOCAL_COPY_HEADERS
|
||||||
|
$(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers)
|
||||||
|
include $(BUILD_SYSTEM)/copy_headers.mk
|
||||||
|
endif
|
||||||
|
|
|
@ -56,4 +56,7 @@ my_module_arch_supported :=
|
||||||
###########################################################
|
###########################################################
|
||||||
## Copy headers to the install tree
|
## Copy headers to the install tree
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_COPY_HEADERS)
|
ifdef LOCAL_COPY_HEADERS
|
||||||
|
$(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers)
|
||||||
|
include $(BUILD_SYSTEM)/copy_headers.mk
|
||||||
|
endif
|
||||||
|
|
|
@ -41,4 +41,7 @@ my_module_arch_supported :=
|
||||||
###########################################################
|
###########################################################
|
||||||
## Copy headers to the install tree
|
## Copy headers to the install tree
|
||||||
###########################################################
|
###########################################################
|
||||||
include $(BUILD_COPY_HEADERS)
|
ifdef LOCAL_COPY_HEADERS
|
||||||
|
$(call pretty-warning,LOCAL_COPY_HEADERS is deprecated. See $(CHANGES_URL)#copy_headers)
|
||||||
|
include $(BUILD_SYSTEM)/copy_headers.mk
|
||||||
|
endif
|
||||||
|
|
Loading…
Reference in New Issue