Commit graph

30 commits

Author SHA1 Message Date
Colin Cross
2a252bef50 Support .rs and .fs files in cc_* module srcs lists
Translate .rs and .fs files to .cpp files using llvm-rs-cc.

Test: builds
Change-Id: I242cea0d09c9985730a512cec7705c3f1479f4ed
2017-05-05 18:22:30 -07:00
Colin Cross
307d145ed5 Remove -isystem frameworks/av/include
Remove the last -isystem for global include directory (besides
bionic).

Bug: 31751828
Test: builds
Change-Id: I8f38332de8f0cffd5c56b9b5ebeacbaaf3a4faea
Merged-In: I8f38332de8f0cffd5c56b9b5ebeacbaaf3a4faea
(cherry picked from commit d13a457a45)
2017-05-03 23:56:47 +00:00
Dan Willemsen
b916b80bf3 Add LLNDK support for the VNDK
Instead of using the NDK headers and libraries, add LL-NDK specific
headers and library stubs for VNDK users. This allows us to provide an
expanded liblog interface.

Test: aosp_arm; m -j
Test: Enable BOARD_VNDK_VERSION on aosp_arm; m -j
Test: Inspect out/soong/build.ninja before/after (w/o vndk)
Change-Id: Ic85f07fa10c695b5baab10c41f5e0ad38700bf3d
2017-04-07 10:18:56 -07:00
Alex Naidis
5df73d02ce Make use of specific Kryo targeting in Clang
Clang supports specific CPU targeting and optimization
for Kryo.

This switches us to using the specific Kryo targeting
when Clang is used. For other compilers, we fallback
to cortex-a57 targeting.

Also, move the replaceFirst function to a shared location.

Bug: 36728278

Test: Built and booted sailfish, ran bionic unit tests and art tests.
Test: Disassembled libc.so before this change and after and looked at
Test: the differences. Mostly the results were the order of instructions
Test: changing.
Test: Verified with the clang person (srhines) that our clang has this support
Test: and that it appears to be mostly instruction scheduling changes.

Change-Id: I4ee73d8bcc1e4f5eccb162c18937811fe199b16f
Signed-off-by: Alex Naidis <alex.naidis@linux.com>
2017-04-06 14:35:44 -07:00
Stephen Hines
4442c2f98e Switch to clang-3859424.
Bug: http://b/36442361
Test: Build and run multiple devices/targets.
Change-Id: Ib2ba71acdc5ae5100122bb498c5a51db74953d42
2017-03-28 22:10:38 -07:00
Dan Willemsen
615609854f Revert "install *.so in different paths for their types"
This reverts commit 4c48f724e1. It's
causing test failures, warnings and complaints, so backing it out and
we'll resolve those before putting it back in.

Bug: 33681361
Test: m -j
2017-03-16 19:48:32 -07:00
Jiyong Park
4c48f724e1 install *.so in different paths for their types
Shared libraries are now installed to different directories depending on
their types.

* NDK libraries: /system/lib/ndk
* VNDK libraries: /system/lib/vndk
* VNDK-ext libraries: /system/lib/vndk-ext
* Framework-only libraries: /system/lib
* Vendor-only libraries: /vendor/lib
* Same-process HALs: /vendor/lib/sameprocess

In addition, a new module type vndk_ext_library is added. It is almost
identical to cc_shared_library but it introduces another attribute
'extends'. This is use to reference the vndk library that this vndk-ext
library is extending.

For example, in order to extend a vndk library libFoo:

cc_library {
  name: "libFoo",
  srcs: [...]
}
---------------------
vndk_ext_library {
  name: "libFoo-extended",
  srcs: [...]
  extends: "libFoo"
}

Then, libFoo will be installed as /system/lib/vndk/libFoo.so and
libFoo-extended will be installed as /system/lib/vndk-ext/libFoo.so.
Note that file name of the latter is libFoo.so, not libFoo-extended.so:
file name of an extending module is automatically set to that of the
extended module.

Bug: 33681361
Test: build & run. Libraries must be in the correct directories.
Change-Id: Ia1eb3940605d582a252c78da0f3a5b36fdab062b
2017-03-14 09:13:44 +09:00
Jayant Chowdhary
e622d20659 Add RenderScript toolchain information to soong.
Test: make -j64 from top of tree.

Change-Id: I9e853e64924f26719c0cd7ae8de4958fe97ca04e
2017-02-07 12:15:45 -08:00
Dan Albert
043833ca81 Add c_std and cpp_std properties.
Test: Checked showcommands ouput for each setting.
Bug: None
Change-Id: Ibe02352f19ca2777b9a419136270e5c4390f1149
2017-02-03 16:45:38 -08:00
Stephen Hines
d19f58a162 Switch to clang-3688880.
Bug: http://b/31532493
Test: Manual validation.
Change-Id: I386c7fc06bd4ca092535365bccbed0a898eb69da
2017-01-31 12:13:37 -08:00
Stephen Hines
73431cb86e Revert "Switch to clang-3625443."
This reverts commit 1d7513decd.

Reason for revert: <INSERT REASONING HERE>

Change-Id: Ida39c91bfc70ba60b2a3113544ec43c566b6c494
2017-01-26 07:59:16 +00:00
Stephen Hines
1d7513decd Switch to clang-3625443.
Bug: http://b/31532493
Test: Manual validation.
Change-Id: I9891e817342e45f16afa4acb57d2d136e16161a6
2017-01-23 15:05:27 -08:00
Colin Cross
35e3972068 Remove frameworks/base/include from the global include path
It is empty now.

Bug: 33630870
Test: m -j native
Change-Id: I8f41b56594241aced0f874af2fa73207b51ff8d6
2016-12-16 08:42:35 -08:00
Colin Cross
14e8dd73d0 Move frameworks/native/opengl/include from -isystem to -I
-isystem hides all warnings.  The warnings in
frameworks/native/opengl/include have been fixed, move it from
-isystem to -I.

Test: m -j native
Bug: 31751828

Change-Id: If182ab5664e22f0cfd5be8cb1d0309d07dc85ceb
2016-12-14 11:13:16 -08:00
Dan Willemsen
d2ede879b5 Add basic VNDK support in Soong
Export a list of libraries in the VNDK, which is currently empty.

Take in Make's global BOARD_VNDK_VERSION, and use that as the SDK
version for modules that specify use_vndk: true.

Modules that use the vndk have some configuration as if they were
building against the NDK (the absence of globally defined headers), but
in other cases look like platform modules (using the platform libc++,
for now).

This change does not attempt to enforce any linking constraints, that
will come in a later patch.

Test: out/soong/build.ninja doesn't change
Change-Id: I3be206b67015ac5177b7eef4a451c579e3dc903f
2016-11-28 13:45:24 -08:00
Stephen Hines
e55a4cc594 Add proper use of LLVM_RELEASE_VERSION for locating libraries.
Bug: http://b/31532493

As I have been updating to LLVM ~4.0, there are numerous locations where
3.8 is hard-coded, and unable to be overridden. This change adds a new
function for getting the ClangShortVersion(), which can look at
environment variables that override this value (particularly useful for
two-stage compilation, where version numbers change between builds).

Change-Id: Iaec19908cf47b3b2317844d6e1329f7bcd81f022
2016-11-18 17:12:38 -08:00
Colin Cross
328f04e778 Move more includes from -isystem to -I
-isystem hides all warnings.  There were no warnings in
hardware/libhardware_legacy/include, hardware/ril/include, or
libnativehelper/include, move them from -isystem to -I.

Test: m -j native
Bug: 31751828
Change-Id: I64cf08b6f6a7f2cfbb19f7d3cc2d2cc9f0157a38
2016-11-03 15:49:36 -07:00
Colin Cross
6f6a428760 Consolidate -std flags
Define the default -std values in global.go, export them in makevars.go,
and use them in compiler.go.

Test: builds
Change-Id: Ia2ae01f63e182d0ad7f371e6d32184bff35a8897
2016-10-18 12:40:51 -07:00
Elliott Hughes
5a0401ab9c Consistently use -std=gnu99 for gcc as well as clang.
This matters for C files that are also built for Windows. Previously they'd
be compiled with -std=gnu99 for the host but [effectively] -std=gnu89 for
Windows.

Bug: http://b/32019064
Test: builds, and can build libcrypto_utils without a manual -std= line
Change-Id: I9c5cc7832220b5c3d6a007ff10d076e26fd8c75d
2016-10-13 14:41:31 +00:00
Colin Cross
2d44c2c716 Move hardware/libhardware/include from -isystem to -I
-isystem hides all warnings.  The warnings in hardware/libhardware/include
have been cleaned up, so move it from -isystem to -I.

Test: m -j
Bug: 32018017
Change-Id: I9a602d5e1bd021638d3a92d93af3d2a18ab4caa7
2016-10-07 11:40:04 -07:00
Colin Cross
1928093246 Move system/media/audio/include from -isystem to -I
-isystem hides all warnings.  The warnings in system/media/audio/include
have been cleaned up, so move it from -isystem to -I.

Test: m -j
Bug: 31997134
Change-Id: I1c0b68935d643992dd9fc7f76583bed286e49325
2016-10-07 11:39:58 -07:00
Colin Cross
315a6ffc99 Move frameworks/native/include from -isystem to -I
-isystem hides all warnings.  The warnings in frameworks/native/include
have been cleaned up, so move it from -isystem to -I.

Test: m -j checkbuild
Bug: 31752268
Change-Id: Ie3656348b5b2a1828dec790aa047635ac0fe6d86
2016-10-05 12:58:29 -07:00
Stephen Hines
fdab996f64 Switch to using clang-3289846.
Bug: http://b/30252254
Test: Built/boot platform using latest prebuilts.
Change-Id: I47c5e8255f84b6f41d1d3e1f3c986e8699ac573a
2016-09-28 08:52:48 -07:00
Colin Cross
81b4ca6817 Revert "Revert "Move system/core/include from -isystem to -I""
This reverts commit 763a26cef5.

Bug: 31492149
Change-Id: I322f5e31da306951ac13131f5113730e945dedd5
2016-09-23 19:20:54 +00:00
Colin Cross
763a26cef5 Revert "Move system/core/include from -isystem to -I"
This reverts commit e4bba1e835.

Bug: 31492149
Change-Id: If46d240274f1a59ac36579157c575b54f2ffd58f
2016-09-23 15:50:14 +00:00
Colin Cross
e4bba1e835 Move system/core/include from -isystem to -I
-isystem hides all warnings.  The warnings in system/core/include have
been cleaned up, so move it from -isystem to -I.

Test: lunch aosp_angler-eng && m -j
Test: lunch aosp_bullhead-eng && m -j
Test: lunch aosp_flounder-eng && m -j
Test: lunch aosp_fugu-eng && m -j
Test: lunch aosp_shamu-eng && m -j
Bug: 31492149
Change-Id: I29967428c2c45f753dabe21b65913fb08fdcabc4
2016-09-22 15:29:50 -07:00
Colin Cross
1cfd89aca3 Split CommonGlobalIncludes for system includes
Split CommonGlobalSystemIncludes out of CommonGlobalIncludes in
preparation for moving global includes from -isystem to -I.

Bug: 31492149
Change-Id: Ib935ea038cdbf9515dc2ab68d7fff924c370906a
2016-09-15 09:33:57 -07:00
Alistair Strachan
777475cb48 Add CC_WRAPPER support
Change-Id: If252c41ec1e3d708f599990c72be69dc8117ae14
2016-08-29 20:39:32 +00:00
Pirama Arumuga Nainar
15690c02d6 Switch to prebuilt clang-3217047
Bug: http://b/30421084
Change-Id: I8b65669ef9f60f85202295de117d3806d3a5b1f6
Test: Tested build, boot and common usage for several devices in AOSP
and internal branch.
2016-08-26 21:54:54 +00:00
Colin Cross
b98c8b0595 Move toolchain and global variables into separate package
Move all of the configuration into a cc/config package

Change-Id: If56fc7242062ed1ce3cb297f78a1e0ef7537373c
2016-08-01 13:37:01 -07:00
Renamed from cc/global.go (Browse further)