Building with USE_NINJA=false and piping build output to a file will
result in ANSI color codes in the build output. Only force ANSI codes
on when building with ninja, which strips the ANSI codes when writing
build output to a non-TTY.
Change-Id: Ifd2fb53799fd99c23b7ad91cdb84d943bf707db0
This uses far fewer hacks in order to build these host tools, but will
require more libraries(libc++,etc) from unbundled and stripped down
branches.
Once this becomes the only option, all builds will happen after soong
runs. Then the toolchain / global cflags information will be able to be
moved from make to soong (and exported back to make).
Change-Id: I270b1d92bcef28a96fbc3ec9910d9bd0c101ac0f
Bug: http://b/26524325
Bug: http://b/25282907
The latest Clang/LLVM requires Vista APIs in order to execute, so we
need to bump the minimum required Windows version for our host tools.
Change-Id: Ic1a760bc240060f5de39ce3a68484886021ff3d9
This was marked as unsupported only on arm[64], even though it works.
For soong, we want to keep a single list of unsupported clang flags
for all architectures.
Change-Id: I9c4ae0f255c549d2346ba7abae57e22c86ddcc61
The CL in [1] changed to create a symlink to /storage/self/primary for
/sdcard. It breaks the mount of /sdcard under recovery.
[1] commit 595003a3d06a13862052ef2f4f578371dae5ad65
Bug: 26509280
Change-Id: I98d02d54d707c2c8826c5ee119cf1a3ffa0c4bc9
- For .l/.y source files, generate .c files; for .ll/.yy source files,
generate c++ files.
- Simplified the rules by adding the generated sources to
my_generated_sources.
- Simplified generated header file naming by always using .h extension
with bison's "--defines=" option.
- Removed the unnecesarry conditional inclusion to the generated
headers. Bison already automatically generates such things.
Bug: 26492989
Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.
Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
The lack of a changing timestamp improves reproducibility of builds, and
helps create smaller OTAs.
Bug: 24204119
Change-Id: I68acfb53be962ffd5c488337517dadb950a13b6f
delta_generator computes the OTA package (aka payload) for A/B update.
Also add its dependent libraries into otatools.zip.
Bug: 25715402
Change-Id: Iddf4b9ac188cc4c8bf3f89ce3641d68451632ba1
am: 8b9589216d
* commit '8b9589216dd8c2a644dab9623952b5fd8a32e550':
Temporary workaround to build bouncycastle / nist-pkits
Build: Build changes for multi oat/image support.
Allow modules to override the default NOTICE file.
Track introduction of libopenjdkjvm.
Allow for 5200 words in dump-words-to-file
Update the package whitelist for the boot image.
Use core-oj alongside core-libart wherever required.
Use the --multi-image option to generate a preopted boot image. This
generates a separate oat file and image file output for each dex file
input.
Stop inlining core.
(cherry picked from commit d1d3fd933f)
Change-Id: Ibd23bc06d346ff404cabd88f7461f041af6016dd
It's useful in projects where different top level modules have
different licenses associated with them.
(cherry picked from commit 3026f4daf1)
Change-Id: I71b20d6f979c0f50562f4f44b2af1f3ec2909444
After switching to OpenJdk, doc-comment-check target
started to fail due to "Too many words (5082)" while
generating out/target/common/docs/doc-comment-check-timestamp.rsp
This change extends number of dumped words to 5200.
Bug: 25758743
(cherry picked from commit 972a2681c6)
Change-Id: I9b8516d1e7c113d667dcfb7963ee352972677afa
With some core classes moved to separate core-oj jar
we need to use the new jar.
(cherry picked from commit 89b94c827f)
Change-Id: I025c0adc70535bf23def3ab0ce28a1bfaef72514
In user builds, adb without authentication is always disabled. However,
it doesn't work with the defaults because authentication doesn't work
without having ro.adb.secure=1 set. It makes sense to offer builds with
no adb but not builds with adb present in an unusable state (especially
as the default).
Bug: 22220212
Bug: 21862859
Change-Id: Ic22300a70586fd57692ac59d6873ab16dde70919
The target BUILD_NATIVE_TEST defaults to building both 32 and 64-bit
versions of the tests. Many of our host tests have opted into this
manually, but some have not. Switch the default on the host tests to
stay consistent.
To preserve script compatibility, a symlink remains pointing to the
binary that would have been built before this change.
Change-Id: I9585984e933c2ac36134fc1968736c0bb5fea7be
With BOARD_USES_RECOVERY_AS_BOOT = true, we skip building the
non-ramdisk boot.img but building the recovery image as boot.img. It
contains recovery's ramdisk (e.g. with /sbin/recovery). It depends on
the bootloader parameter (skip_initramfs) to determine the actual mode
to boot into.
Change-Id: Id6e2d0a2b94383944ca8f35bba688c6401745622
(cherry picked from commit d80bef2b9e)
RPATH was used in order for ASan executables to prefer ASan libraries
under /data. Now ASan executables use a special loader (linker_asan),
which implements this logic. RPATH is no longer needed.
Change-Id: Ic7a39b022267b80bd0ce3e95a2e822eb308a1fba
Reorder the definitions of the core cflags so that we can prevent device
configurations from changing the global C(PP)FLAGS.
There is no reason for devices to be configuring the global cflags -- if
something needs to change for a particular device, that flag should be
defined in the BoardConfig.mk, then used in the individual makefiles
where it is needed. The common global flags also affected host tools,
which should not change between device configurations.
Bug: 26165350
Change-Id: Icece4505ce3d2a9168087d802953378534018d47
Default source version is 1.7 in Jack B and Jack C so this means no
change to default. Not forcing it in the build rules will allow to
change it in LOCAL_JACK_FLAGS.
Bug: 26257295
Change-Id: If9b5fe250eea4bc6bcb3c16ad9cf7024d399ff3c
Mac builds use a javadoc tool that fails on more warnings than linux
builds. Add -Xdoclint:none to all java 8 standard doclet javadoc
commands.
Don't add it to javadoc commands that use the com.google.doclava.Doclava
doclet, it doesn't understand -Xdoclint:none.
(cherry-picked from commit 8bf7b5d51a)
Change-Id: Ic5b8431ec2facb7989473b06ebe07246f6d2317f
BUILD_NUMBER is use to generate ro.build.description and
ro.build.display.id, if USER is long, these properties will
exceed 91 characters easily.
Change-Id: I7f99ef351f80210172a873104edd980b36c3f8f1
Signed-off-by: weiqiao <qiaowei224@gmail.com>
We switched to running prebuilt host tools in place in
prebuilts/sdk/tools in TARGET_BUILD_APPS build. This logic is no longer
needed.
Change-Id: Ibf88b3c0a09fb3a1a04b25403457c48851ecc6f4
Host binaries may be run during the build process and the internal
implementation of the shared libraries makes a difference for the build
result. This change makes sure host tools get re-linked and re-run when
any of its dependency libraries gets updated.
DEX2OAT is such a host tool. We also changed DEX2OAT as full dependency
of dex-preoptimization, so we rebuild the odex files if DEX2OAT itself,
or any dependency libraries changed.
Bug: 24597504
Change-Id: Idf0d9be82ccebd826d9c5b405a39cff437e0af29
Turn back on ld.gold and W-l,--icf=safe for
aarch64, now that the prebuilt ld.gold has been updated
with support for reloc 311/312 (fixed upstream, see
https://sourceware.org/bugzilla/show_bug.cgi?id=19042)
Bug: 25642296
Bug: 26153840
Change-Id: Idceb357a48d9da4eec38ab8f2103245d500622ae
Some projects are still built with our host GCC 4.8, which doesn't
support -fstack-protector-strong. The combo .mk files are used by
GCC and clang, so it's not safe to turn on -fstack-protector-strong
there. Instead, do it in the clang-specific .mk for now.
We can clean this up when elfutils (the last code built for the host
with GCC that I'm aware of) is built by clang. We'll be able to
remove the host GCC prebuilts too!
Change-Id: I314b9eab071c132a8e2cb8cc779a75ae8abb12e2
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: I2fb7f0bfccbfa5d22ca8858309a133469edbc7b6
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: Iccc20852db8a5e4dd9792f9da6d5e325fc59b0a5
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: I3ce7a73c5cf36eba5c74df37367f3d3475b0a4ed
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: I55a9fdbf5777ccdeed9f2e9a23c73bb94ad7b646
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).
The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.
https://lwn.net/Articles/584225/
Change-Id: I97a2187cebac64e3b9f22b691d4676b6da083ebd
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.
For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).
We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.
Performance:
$ m && touch \
frameworks/base/core/java/com/google/android/util/Procedure.java \
&& time m
Before: 3m48s
After: 1m46s
Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
This was previously working because for some reason prebuilts/ndk had
a tangled mess of hand assembled symlinks that pointed lib -> lib64
for the multilib architectures.
Change-Id: I294d67f58f2008b1a53790cf676f5223df449cbc
This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.
Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.
Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
When USE_CLANG_PLATFORM_BUILD is not set, default will be clang/llvm.
USE_CLANG_PLATFORM_BUILD=false can be used to select gcc as default.
BUG: 23163853
BUG: 26102335
Change-Id: I00604c2aef4849e8c3505b2c4002eb1c46cd1fd1
libext2_uuid_host was renamed to libext2_uuid-host to match the
"-host" suffix used in most libraries.
Bug: 24619596
TEST=make dist
Change-Id: Ic5faccb4d5fdbbf3d3bba6f4a35cf99d4961bb54