depends: set env-provided flags to per-release

Users can now safely set flags and have them override the optional
per-release-type flags.

This also means that user-provided flags will now be forwarded to CMake's
build-type flags variables so that they'll correctly override the existing
values.
This commit is contained in:
Cory Fields
2025-01-14 19:42:53 +00:00
parent 40a01e9d30
commit f7906de7e8

View File

@@ -29,12 +29,11 @@ endef
define add_host_flags_func
ifeq ($(filter $(origin $1),undefined default),)
$(host_arch)_$(host_os)_$1 = $($1)
$(host_arch)_$(host_os)_$(release_type)_$1 =
$(host_arch)_$(host_os)_$(release_type)_$1 = $($1)
else
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
$(host_arch)_$(host_os)_$(release_type)_$1 += $($(host_os)_$(release_type)_$1)
endif
$(host_arch)_$(host_os)_$1 += $($(host_os)_$1)
host_$1 = $$($(host_arch)_$(host_os)_$1)
host_$(release_type)_$1 = $$($(host_arch)_$(host_os)_$(release_type)_$1)
endef