Skip to content
  1. Apr 30, 2018
    • Colin Cross's avatar
      Use and export proguard flags from static dependencies · 89c31581
      Colin Cross authored
      Export proguard flags from Android library modules, and use them
      from static dependencies in Android apps when running proguard.
      Also export them to Make.
      
      Unlike Make, which concatentates all the exported flags from
      dependencies, Soong dedups exported flags files.
      
      Bug: 73724997
      Test: m checkbuild
      Change-Id: I8f86fecb09cbc591832ce67e8ecef551a6600349
      89c31581
  2. Apr 26, 2018
  3. Apr 25, 2018
    • android-build-prod (mdb)'s avatar
    • Dan Albert's avatar
      Fix incomplete LTO bug workaround. · ea4b7b9c
      Dan Albert authored
      https://android-review.googlesource.com/c/platform/build/soong/+/641827
      forgot this use of ClangTriple(), so static libraries aren't being
      installed to the correct place.
      
      Test: OUT_DIR=ndk-out DIST_DIR=ndk-dist \
          build/soong/scripts/build-ndk-prebuilts.sh && \
          ls ndk-out/soong/ndk/sysroot/usr/lib
      Bug: None
      
      Change-Id: I750ab198deff92aac06935d38d529b53030f9636
      ea4b7b9c
    • Colin Cross's avatar
      Don't use AppsDefaultVersionName for framework-res.apk · 402d5e09
      Colin Cross authored
      Some builds set AppsDefaultVersionName() to include the build
      number ("P-123456").  aapt2 copies the version name of
      framework-res into app manifests as compileSdkVersionCodename,
      which confuses things if it contains the build number.  Use the
      DefaultAppTargetSdk ("P") instead.
      
      Bug: 78324052
      Test: m TARGET_BUILD_WITH_APPS_VERSION_NAME=true Dialer
            aapt dump badging $OUT/system/priv-app/Dialer/Dialer.apk | grep compile
            shows compileSdkVersionCodename=P
      Change-Id: If67f40aae1066d4ff3bf97da1b2de2e1e250ad9c
      402d5e09
    • David Brazdil's avatar
      Add new Doclava flag support to soong · aac0c3ca
      David Brazdil authored
      CL I8fe27e8c03334f9c90204db1e69447de65a06a38 adds new "-removedDexApi"
      flag to Doclava. This patch adds support for that flag into Soong.
      "droiddoc" targets can generate the new API file with property
      "removed_dex_api_filename".
      
      Bug: 78182899
      Test: make
      Change-Id: I04b8f615aa4655167b824d40c3fafa2648beec01
      aac0c3ca
    • Logan Chien's avatar
      Introduce runtime_libs to cc_binary and cc_library · 43d34c38
      Logan Chien authored
      This commit adds `runtime_libs` to cc_binary and cc_library.
      
      Similar to the `required` property, if a module specifies the
      `runtime_libs` properties and it is installed, then the modules
      specified in `runtime_libs` will be installed as well.
      
      Differnt from the `required` property, if a module is using VNDK and the
      module names specified in `runtime_libs` are resolved to the modules
      with both core and vendor variants, then '.vendor' will be appended to
      those module names.
      
      For example, if `libb` is vendor_available and `libd` is a vendor lib,
      then LOCAL_REQUIRED_MODULES will contain `libb.vendor` (instead of
      `libb`).
      
      Bug: 72343507
      Test: lunch aosp_arm64_ab-userdebug && make  # this runs the unit tests
      Test: Create a vendor module with runtime_libs property to a
      vendor_available shared library and check the generated Android.mk.
      
      Change-Id: I9e245d80004dab597a5d3db5acd8a09117118db7
      43d34c38
    • Chih-hung Hsieh's avatar
      95ba30aa
    • Chih-Hung Hsieh's avatar
      Disable LLD for Darwin host executables. · e5ac6093
      Chih-Hung Hsieh authored
      * See upstream status of lld for Mach-O at https://lld.llvm.org/AtomLLD.html
      
      Bug: 73768157
      Test: make checkbuild
      Change-Id: I2e892193b6d75afd4358df8b2f674aa94888fb32
      e5ac6093
  4. Apr 24, 2018
    • Nan Zhang's avatar
    • Colin Cross's avatar
      Merge "Add pom2bp" · 9850f48d
      Colin Cross authored
      9850f48d
    • Treehugger Robot's avatar
      Merge changes I083907ef,Ie8e0f97a · c52e90ed
      Treehugger Robot authored
      * changes:
        Add pom2mk -exclude
        Add pom2mk -regen
      c52e90ed
    • Colin Cross's avatar
      Add pom2bp · 70dd38f0
      Colin Cross authored
      Convert pom2mk to pom2bp that writes out Android.bp files instead
      of Android.mk files.  pom2mk stays for now until the last users
      of it are cleaned up.
      
      Bug: 78300023
      Test: cd prebuilts/sdk/current/support && pom2bp -regen Android.mk
      Change-Id: I584d63c4228bad32f9e1914b06bde807078d6a55
      70dd38f0
    • Nan Zhang's avatar
      Fix the undefined CommandDeps for standard Javadoc · 30963749
      Nan Zhang authored
      When compiling against without customized doclet, Javadoc doesn't need
      to depend on Doclava and Jsilver jars. Originally, we leave these two
      jars empty in Args so that CommandDeps won't have these two
      dependencies. But Ninja doesn't like that with errors:
      
      ninja: error: build.ninja: empty path
      because $Jsilver and $Doclava is undefined when compiling Javadoc.
      
      Test: m -j platform_library-docs
      Bug: b/70351683
      Change-Id: I02fee181490f91e87a1feac74f3a69b5b4acb528
      30963749
    • Treehugger Robot's avatar
      2782ca41
    • Alex Light's avatar
      Add support for generating Compdb file · ec868fc4
      Alex Light authored
      Some tools (i.e. you-complete-me) make use of a 'compdb' file
      (compile_commands.json) that records (among other things) the
      arguments needed to compile a file. These tools can use this with
      libclang to provide semantic completions and perform other IDE
      actions. This CL adds support for soong to generate a (simple)
      compile_commands.json file.
      
      Test: make SOONG_GEN_COMPDB=1 SOONG_LINK_COMPDB_TO=$ANDROID_BUILD_TOP nothing
            examine $ANDROID_BUILD_TOP/compile_commands.json
      
      Change-Id: I751bb344b90dfcdad1dfd71c2a85bacd345f0464
      ec868fc4
    • Jiyong Park's avatar
      Additional fixes for java_sdk_library · 82484c07
      Jiyong Park authored
      This change fixes several problems found while re-defining some libs
      using java_sdk_library module type.
      
      1) A phony module whose name is the same as the java_sdk_library name is
      defined. It is used to support installing the runtime library via
      PRODUCT_PACKAGES (even when there is no dependency from other modules).
      
      2) A bug that package names whose depth is >= 2 is ignored in
      droiddoc.srcs_lib_whitelist_pkgs is fixed. A package name foo.bar.baz is
      now converted to a path foo/bar/baz following the Java convention.
      
      3) A make variable JAVA_SDK_LIBRARIES that is the list of java_sdk_library
      module names is exported to make. This can be used to distinguish SDK
      libraries from ordinary libs.
      
      4) When running doclava, some framework sources in the 'android' package
      and the same packages as the SDK library are automatically added to the
      sources list. This is required for the case when API class is extending
      from the framework class. In that case, doclava needs to know whether
      the base class is hidde nor not. Since that visibility info is encoded
      as @hide string in the comment, we need source files for the classes,
      not the compiled ones. Also there are rare cases where part of SDK
      library is implemented in the framework (e.g. org.apache.http.legacy).
      In that case, we need framework source to make API stubs, though the
      sources are not required to build the runtime library.
      
      5) The stubs libs are disabled for PDK builds as well.
      
      Bug: 77575606
      Test: m -j
      
      Change-Id: I360cf15fe5339e46644fb16d0dabe2548aa315f9
      82484c07
    • Treehugger Robot's avatar
  5. Apr 23, 2018
    • Colin Cross's avatar
      Add pom2mk -exclude · 6b382bcd
      Colin Cross authored
      Add an option to pom2mk to exclude modules by name.
      
      Bug: 78300023
      Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk -exclude androidx.car_car
      Change-Id: I083907ef364384aace524ced81820567f5075d76
      6b382bcd
    • Colin Cross's avatar
      Add pom2mk -regen · 9f5633d6
      Colin Cross authored
      pom2mk -regen Android.mk will read the previous arguments out of
      Android.mk, rerun pom2mk with those arguments, and write the result
      to Android.mk.
      
      Bug: 78300023
      Test: cd prebuilts/sdk/current/support && pom2mk -regen Android.mk
      Change-Id: Ie8e0f97ae5b87c8078cf8e753489326d80da1896
      9f5633d6
    • Pirama Arumuga Nainar's avatar
      Revert "Support coverage instrumentation for Linux host" · 0b882f03
      Pirama Arumuga Nainar authored
      This reverts commit 358056c0.
      
      Reason for revert: Breaks build_test target in some branches.
      
      Change-Id: I604561033038d4ff15b74caf7b81ff5c8dd9632f
      0b882f03
    • Treehugger Robot's avatar
    • Jeff Gaston's avatar
      pom2mk to include extra-deps as top-level deps too · 358f25e9
      Jeff Gaston authored
      Specifically, the use case is android-support-car requires some stubs that don't have a Maven pom.
      So those stubs can't easily be listed as a dependency in the pom.
      However, we do want the dependency to exist when importing to Make and detected by extract_deps.py
      
      Bug: 76692459
      Test: m -j blueprint_tools \
            && update_prebuilts.py -s <build_id> \
            && git diff HEAD^ -- fix_dependencies.mk \
            && m -j checkbuild
      
      Change-Id: If546ecf7416580a01bde7b906976ada4b1145253
      358f25e9
    • Pirama Arumuga Nainar's avatar
      Support coverage instrumentation for Linux host · 358056c0
      Pirama Arumuga Nainar authored
      Bug: http://b/77792074
      
      - Add the libclang_rt.profile runtime libraries directly to the compile
      command (for both host and target) instead of relying on the Clang
      driver.
      - Move the coverage mutator to PreDepsMutators so the mutation has
      already happened when runtime libraries are added during dependence
      computation.
      - Factor out cc/config/toolchain to identify libclang_rt.profile modules
      for the x86 and x86_64 host.
      
      Test: make NATIVE_COVERAGE=true produces coverage-enabled host binaries.
      Change-Id: I1ebc8cffdf11622bfc18199a57674672888b3a5f
      358056c0
  6. Apr 21, 2018
  7. Apr 20, 2018
  8. Apr 19, 2018
  9. Apr 18, 2018
    • Jiyong Park's avatar
      Adding java_sdk_library · c678ad3f
      Jiyong Park authored
      java_sdk_library is to make a Java library that implements optional
      SDK APIs to apps. It is actually a wrapper for several modules: 1) stubs
      library that clients are linked against to, 2) droiddoc module that
      internally generates API stubs source files, 3) the real runtime shared
      library that implements the API, and 4) XML file for adding the runtime
      lib to the classpath at runtime if requested via <uses-library>.
      
      Note: this is only the initial CL for the feature. Followings are features
      currently missing and under development.
      
      1) check for API consistency
      2) install stubs libs as the dist artifacts
      3) ensuring that apps have appropriate <uses-library> tag
      4) disallowing linking to the runtime shared lib
      5) HTML generation
      
      Bug: 77575606
      Test: m -j
      
      Change-Id: I4a4ccf6e730e041703c63bb275d8860d0de96887
      c678ad3f
    • Colin Cross's avatar
      59bcf6e6
    • Colin Cross's avatar
      5ddf2922
    • Colin Cross's avatar
      Fix aapt2 --min-sdk-version after finalized SDK · d09b0b65
      Colin Cross authored
      aapt2 --min-sdk-version was using AppsDefaultVersionName(), which
      is OMR1 for a non-finalized SDK, but 8.1.0 after finalization.
      Add PlatformSdkCodename() for non-finalized SDKs, use it for
      DefaultAppTargetSdk(), and pass it for aapt2 --min-sdk-version.
      
      Bug: 78224641
      Test: TestAppSdkVersion in app_test.go
      Change-Id: I622eaf92f8a940f79007c2a579536da325700b06
      d09b0b65
    • Pirama Arumuga Nainar's avatar
      Fix few issues with filegroups · 955dc499
      Pirama Arumuga Nainar authored
      Bug: http://b/64121881
      Bug: http://b/78188880
      
      - Allow filegroup's properties to be extended by a LoadHook
      - Support a filegroup (':module') in a prebuilt's 'Srcs' property to
      export files from a different path as the prebuilt's sources.
      
      This change also includes a refactoring that moves genrule/filegroup.go
      to android/filegroup.go so that FileGroupFactory is visible in
      prebuilt_test.go.
      
      Test: Test
      https://android-review.googlesource.com/c/platform/development/+/469159
      in clang-tools branch on Linux, Darwin.  Test regular build in
      aosp/master.
      
      Change-Id: I3ff6215ab2e62955f039fd1086c31f1bd50ebcf6
      955dc499
    • Nelson Li's avatar
      build/make: set LOCAL_NATIVE_BENCHMARK for Google Benchmark Test · 1f6b14e8
      Nelson Li authored
      Set LOCAL_NATIVE_BENCHMARK to true. Then, build system can use it
      to auto generate the related Test config file of Google Benchmark
      Test
      
      Bug:74844131
      Test: Use mm to rebuild any module in cc_benchmark
      Change-Id: I6a8f1ff78f7aec3f4eb17e218845f0cdf3f57f32
      1f6b14e8
Loading