When HOST_OS=linux and HOST_CROSS_OS=linux_bionic, then a module enabled
for the target "linux" is mutated for both linux(linux_glibc) and
linux_bionic. Although this is WAI for most of the host modules, but
also causes duplocated SOONG_* variables from prebuilt_build_tools
modules. They are configured as HostSupportedNoCross, but linux_glibc
and linux_bionic are not considered as HostCross on the regular
linux/x86 machines, because it can run artifacts from both variants
natively.
Since the problem is at SOONG_* variables, not in the fact that
linux_bionic is not considered as HostCross, fixing the problem by
emitting the variable only for the variants whose OS is the same as the
build system OS (android.BuildOS).
Bug: N/A
Test: apply aosp/1512778, lunch mainline_sdk && m nothing.
out/soong/make_vars-mainline_sdk.mk doesn't have duplicated SOONG_*
variables.
Change-Id: Ieb51d180b7c1ee758e7a376a960a8c3b91c836c9
Add PackageFile that creates a PackageSpec like InstallFile,
but doesn't create the install rule. Also improve the documentation
on InstallFile and friends, and on HostToolProvider.
Bug: 124313442
Test: m checkbuild
Change-Id: I30f44a2b3833e48d0bb71bf7c45955f88fb00bc8
Can happen if OUT_DIR is set on an absolute path.
Test: env RBE_remote_disabled=true OUT_DIR=/home_2/tmp/out m
Bug: 169048540
Fixes: 169048540
Change-Id: Ia6b91b13142d84e54d0dee8b4e04a91ad2cecc36
Includes fixes for out dirs at absolute paths, and symlinks to absolute
paths. Also squashes support for exporting make vars, which previously
happened in a later patch (which got moved first, since it's mostly
infrastructure changes).
Original message:
cc_prebuilt_binary doesn't work well for host tools because they'll
often be using their own versions of shared libraries that may not be
compatible with what we build.
So add a module type that allows genrules to use one of these prebuilts
as a tool. Like other prebuilts, we'll use the source module if we have
it, or the prebuilt otherwise.
It supports adding extra dependencies for shared libraries or other data
files that are necessary to run the tool. Any genrules using the tool
will be rerun if any of the dependencies change.
Bug: 128690776
Test: treehugger
Test: build one-true-awk using genrule with bison
Test: with OUT_DIR=$PWD/out
Test: with OUT_DIR pointing to an absolute symlink
Change-Id: I662296cb55503b6a10ec5e5465b138e9edeb71f3
Revert submission 1366377-prebuilt_build_tool_make
Reason for revert: breaks build
Reverted Changes:
I20bf062bb:Export prebuilt tools to Make
I4bb526492:Move some prebuilt build tool configs to Soong
I195b68813:Support per-module MakeVars
Ibcb257e7b:Fix dependency loop with flex
I6150f0f39:Switch cc's use of bison and flex to prebuilt_buil...
I6939451b8:Reland "Use genrules to build a consistent awk."
Idee60640f:Add prebuilt_build_tool modules for genrule use
I00893172b:Rename bison to bison_bin
I82c26be1c:Add prebuilt_build_tool to allow genrules to use p...
Change-Id: I6b3acf306d355f3e0463564c9ebe9482fa0f609e
This reverts commit 2019658b86.
Reason for revert: broke builds where makefiles were using M4 without depending upon it
Change-Id: I18304246e7a8a8f8c2620dd2c65ed77acd256be2
This allows setting per-module make variables earlier in the build,
particularly for prebuilt_build_tool users like LEX/M4/BISON. I moved
filegroup over because it's a simpler common interface, but it doesn't
strictly need it.
With this, the last user of the hardcoded cc.m4Cmd variable is gone.
Test: Inspect out/soong/make_vars-*.mk, out/soong/late-*.mk
Test: treehugger
Change-Id: I195b688131feac0c100c338a0749368aa5d50f4f
cc_prebuilt_binary doesn't work well for host tools because they'll
often be using their own versions of shared libraries that may not be
compatible with what we build.
So add a module type that allows genrules to use one of these prebuilts
as a tool. Like other prebuilts, we'll use the source module if we have
it, or the prebuilt otherwise.
It supports adding extra dependencies for shared libraries or other data
files that are necessary to run the tool. Any genrules using the tool
will be rerun if any of the dependencies change.
Bug: 128690776
Test: treehugger (builds one-true-awk with bison)
Change-Id: I82c26be1c3c9fe6cab42892ddea339c301c0b316