This reverts commit 59e4951021.
Reason for revert: Attempt to roll forward again.
Test: m droid dist reportmissinglicenses
Change-Id: Ibf5a9869d03726e279fb23bf68ca66547b972138
Switch from combine-notice-files to html-notice-rule and
text-notice-rule.
Bug: 151177513
Bug: 213388645
Bug: 210912771
Test: m cts reportmissinglicenses
Change-Id: I59d78553f15f0fd6be87228c933693b63e2ebf04
Copy the license metadata files from Soong if they've already
been built.
Bug: 207445310
Test: m checkbuild
Change-Id: I142c192843e94b018079809bd596ff81136b2de3
Store the meta_lic files in the per-module intermediates directories
to avoid conflating multiple variants for the same module, for example
host and device.
Bug: 207445310
Test: m checkbuild
Change-Id: I2b0ca22c1f7b069f79d2026707be3294c488f6de
Gets rid of .meta_module files and instead defers emitting rules until
after all the non-module targets have been processed. Allows direct
dependency on .meta_lic files, which in turn depend on license text
files.
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Test: m systemlicense
Test: m reportmissinglicenses
Change-Id: I2c467feac6e13a9366ff66f924889f1dbd48c3f1
For cases with a my_register_name, move into $(call license-metadata-rule).
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m nothing
Change-Id: Ib6c610960347db84503831b1e1519622696d4500
Merged-in: Ib6c610960347db84503831b1e1519622696d4500
Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: I1f672e6e8ec48f0141bb4b6cc4eb2efed1eeef6b
Revert "Export soong license data to make."
Revert "Add ability to declare licenses in soong."
Revert submission 1377717-metalics
Reason for revert: This has broken renderscript_mac target for aosp-master, see b/176909442
Reverted Changes:
I26ac54ca9:Define the standard license_kind rules.
I656486070:Export soong license data to make.
If9d661dfc:Export soong license data to make.
I97943de53:Add ability to declare licenses in soong.
Icaff40171:Rough-in license metadata support to make.
Ib8e538bd0:Add variables for notice deps, license kinds etc.
Change-Id: Iaf2243cba16f6191b022371a14f81ef8194a47d1
Non-installable generated intermediate data modules can have
notice files attached when they're defined in the same LOCAL_PATH
as the installable module that depends on them. This makes uninstallable
DATA modules silently ignore the fact that the build doesn't know where
to install the notice file.
Bug: 160248517
Test: build
Change-Id: I09a8a253dda52c2d78a1ebc0c33cd96e3505e2e3
Merged-In: I09a8a253dda52c2d78a1ebc0c33cd96e3505e2e3
Revert "Add sdk mutator for native modules"
Revert submission 1242911-sdk_version_variant
Reason for revert: b/153394225
Reverted Changes:
Ife99745fb:Use libnativewindow for platform variant of libagq...
I1bae84c43:Use libnativewindow for platform variant of androi...
I6e6021ed3:Use stl to depend on libc++
Ife99745fb:Use libnativewindow for platform variant of libRSS...
I2c9f439b9:Fix static dependency on libprotobuf-cpp-lite-ndk
Iff2aff9cf:Set sdk_version for cc_genrules used by modules wi...
I7d72934aa:Add sdk mutator for native modules
Ief378a007:Use sdk variant of Soong modules when LOCAL_SDK_VE...
Bug: 149591340
Change-Id: I6cd4de221ece29e48d58a8b1297dc2512b2dad13
Fixes: 153394225
Soong now makes a variant of native modules that set sdk_version.
Use the new variant for native modules or apps with JNI that are
defined in Make and set LOCAL_SDK_VERSION.
Test: m checkbuild
Bug: 149591340
Change-Id: Ief378a007e43b0aea31fd5845410bbffec0ffae6
As a first step to removing the go/android3p instructions to copy or
to link NOTICE to LICENSE, include LICENSE files in the notices, which
will allow deleting all of the copied/linked NOTICE files.
The change causes a couple minor additions to the system image notice
files.
Test: manually built and compared before and after notices
Change-Id: Id23cae4a8f2d103e1379f4341340fc56c5943dc2
Path conflicts could happen when following conditions are met.
1) a java library named "foo" is not installable.
2) a java library named "bar" is installable, and its stem is set to
"foo".
Then the notice file for 1) becomes foo.jar.txt following its
LOCAL_MODULE, while the notice file for 2) becomes foo.jar.txt following
its stem. Since the file for 1) is a synthetic one, the actual name
isn't important. Avoid the conflict by appending a suffix
(_non_installable, but could be anything) to the file name for 1).
There still is a chance for the conflict; if the stem for "bar" is set
to "foo_non_installable". But practically, the chances are very low.
Bug: 139391334
Bug: 143700028
Test: m
Change-Id: Id50b30774bbf65cc180baf963a95ea56fe6eb74f
Support for rust modules built in Soong.
Bug: 136189233
Test: Test module builds.
Test: crosvm builds.
Change-Id: Idf2e4a4f760cbcee1d35fe6567ef8e12d4855094
You can get a system.img without current VNDK libs.
This may help when you want a smaller system.img given that the image
will be used with a specific version (not current) of vendor image.
Bug: 132140714
Test: m TARGET_SKIP_CURRENT_VNDK=true && see if current VNDK is not
installed
Change-Id: Ie0815e6dd6ce2f861b6c42e637da4bb146320673
Non-installable, non-library modules can still have notice files
attached if they are bundled in an apex module, in which case the
current make setting would generate an error. This change makes it just
ignore them silently if the module is ETC. Other classes will still
trigger an error.
Test: manual build + TreeHugger
Change-Id: Ic7931f990369f744c8de62956a1a0a9c0451d6ab
This fixes a bug where cross host OS notice dependecies were incorrectly
added and caused missing file errors.
Bug: 36073965
Test: Manual build + inspection
Change-Id: I3983ad6158acf939842f836fe3f44cecf9187087
These had been depending on the phony target for the library
(liblz4.vendor), not the actual built file and notice file.
Since we hadn't been saving the NOTICE file, and were only assuming the
installed notice file path. save that away for use during packaging.
Test: m vndk; diff out/target/product/generic/android-vndk-aosp_arm.zip
Test: m vndk; diff out/target/product/generic_arm64/android-vndk-aosp_arm64.zip
Change-Id: If9a4bed27030b7bd464cd3987739df94d32a0037
Currently the build system will automatically attribute a NOTICE
file with the target of $(BUILD_PHONY_PACKAGE). This shouldn't
be the case.
Disable notice file inclusion for fake targets so that the
/fake_packages/blah_blah-timestamp paths don't show up in
NOTICE.xml.gz.
Bug: 77910458
Test: NOTICE files are not attributed to fake targets.
Change-Id: Ia942cac41b750efbd5a23d896d85ac0820ee8b4e
Remove all support for running jack.
Bug: 65302138
Test: m -j checkbuild
Change-Id: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
Merged-In: I1ef87c88af3f2689f8b0dcf1a01c958b16159631
(cherry picked from commit 5db5d31d73)
There are many references to ndk stub libraries in the third party
notices:
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/libc.so
out/soong/ndk/platforms/android-10/arch-arm/usr/lib/liblog.so
...
These are just stub libraries, and aren't distributed on the device. The
real versions of these libraries will be distributed on the device, and
already have the license information.
So let Soong set LOCAL_NO_NOTICE_FILE to prevent these from appearing.
Bug: 36867708
Test: Diff aosp_arm's system/etc/NOTICE.html.gz file before/after
Change-Id: Ifa3693bde7d3b6b9dc7a83122f9cfa24997fac50
We currently use static libraries without any source files to represent
header libraries, but Soong actually has cc_library_headers. So to
export those in a separate namespace from static libraries, implement
them in Make as well.
This also adds a nice pretty-warning / pretty-error macro that can be
used to print out standard warning messages pointing to the real source
file having the problem.
Test: Use a header library exported by Soong in a Make module
Change-Id: I3486539e247524cb82a20620745fc7be03014e14
The PDK uses pattern rules in order to install files from the PDK. When
those files already have build rules, the explicit rules override the
pattern rules, and everything works. But because Make (and Kati) doesn't
attempt to clean the file paths, if one of the rules has a redundant /,
we'll export two ninja rules, and ninja will error out with a dupbuild
error.
The PDK pattern rules are clean, but the explicit notice file creation
was not, it was always adding a double // in between NOTICE_FILES/src
and the module path.
Some modules were also setting a LOCAL_MODULE_PATH with a trailing /,
which is redundant, and also hits the above problem. Instead of fixing
all of the modules, just strip a trailing / from my_module_path.
Bug: 33451638
Test: Build with a PDK
Change-Id: Iff3e98fd191ea90626b9b89f179537e8a75f5ef2
Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.
Merged-In: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
It's useful in projects where different top level modules have
different licenses associated with them.
(cherry picked from commit 3026f4daf1)
Change-Id: I71b20d6f979c0f50562f4f44b2af1f3ec2909444
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.
Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_JACK_ENABLED:=full # disabled, full, incremental
in the mk portion defining the module.
Jack execution environement can be controlled with:
Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack
LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.
This includes cherry-picks of the following changes:
b4c49cba5722c3fa6d73138768c1bb5dd3e1d31283d5d040478bc90fd2d6140274707e0fbc9ff2a2833b427d72f9a27f45b4280966694137822c443dc6b44d43c3d2a76c14bf06744f60fc95573d5036b8213916142794e7b582801f2c44d0c76d99dca1f528e132d676a5e0bd1ae25b3984ff Partially, only Jack related parts werekept
ec46a3b71fabee3a9f4177cbe10fd9daf07db4cdb6bfb5893a
Ie all Jack related changes untill
b6bfb5893a
except
a96cc59ab5 "Use Jack by default"
Change-Id: If9d47ef1c4fd1e6765ad2a47d816c1ad3cfab0e3
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.
Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
In apps_only build (after running tapas or exporting TARGET_BUILD_APPS),
run "make notice_files" to collect and combine the NOTICE files of
modules that are needed by the apps.
Bug: 10445634
Change-Id: I6555bba1104e43b48c723c82143c46d444a75e80
When the NOTICE file for a module changed, the new NOTICE was being
concatenated onto the end of the old one in non-clean builds, taking up
more and more space and presumably duplicating most of the content. Only
one set of rules for a given file can exist in make, so there cannot be
a case where more than one $(notice_file) was intentionally being
concatenated together as this would be an error.
Change-Id: I0f5fae498225eaee5cc75d854223b5ba790fcebe
To pick up a NOTICE file in LOCAL_PATH and attach it to
/system/lib/libfoo.so, use the following syntax:
include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NOTICE_FILES
LOCAL_INSTALLED_MODULE := $(PRODUCT_OUT)/system/lib/libfoo.so
include $(BUILD_NOTICE_FILE)
Bug: 7460213
Change-Id: Ie692be72deab37be04d1b578578c131a0885a090
The Chromium makefile generator used to use module class NONE for the
meta-targets in the gyp files; this was changed to GYP in order to make
it more obvious where they come from in the build. Update the build
system's handling of NOTICE files to reflect this change.
Change-Id: Iff7d4487f3024ec83db0c2a896ec0caf8fb18b24
Targets of type NONE are used extensively in Android makefiles which have been
auto-generated from gyp build files. The gyp generator uses such targets to
represent gyp targets which don't produce an output file. Typically, many such
targets exist in a single Android makefile.
We use a generated Android makefile for Chromium. This project has a NOTICE
file, intended to be installed with a SHARED_LIBRARY target. However, the build
fails when processing the targets of type NONE, as it does not know where
to install the NOTICE file.
This change causes the NOTICE to be ignored in this case, rather than failing
the build.
Change-Id: I70cf9a406e4a1c932f8a734f53491f7c5281ee17
The GNU Make wildcard function can be used to look for a specific file and
is _much_ faster than invoking the find command through $(shell ...).
Since notice_files.mk is included by base_rules.mk for each and every module
in the build tree, this represents a considerable speed-up. For example, when
building the full-eng product from the AOSP tree, the no-op "make" goes from
21 seconds to 16 seconds with this patch applied.
Change-Id: Ideb1bb74d5bfbb650834fa4b6e151ff24dcd0150
Use a different name for prebuilt libraries based on their LOCAL_MODULE --
they were all colliding using the same name, javalib.jar. These names
are synthetic, since the libraries don't actually exist on the device
as such.