Skip to content
  1. Feb 07, 2024
  2. Feb 06, 2024
    • Jihoon Kang's avatar
    • Spandan Das's avatar
      Use source_module_name to determine the contents of prebuilt apexes · 161e4687
      Spandan Das authored
      There are a couple of instances in apex/ and java/ that rely on the naming
      convention that the jars exported by prebuilt apexes follow the name of
      the java_sdk_library_import, minus the prebuilt_ prefix. With muliple
      module sdk prebuilts in trunk stable, this naming convention might not
      be valid. Use `source_module_name` instead.
      
      ```
      prebuilt_sscp_fragment {name: "", contents: ["service-foo.v2"]}
      java_import {name: "service-foo.v2", source_module_name: "service-foo"},
      ```
      
      We should use service-foo and not service-foo.v2 because
      1. The prebuilt apex contains service-foo.dex
      2. PRODUCT_*JARS will contain service-foo and not service-foo.v2
      
      For clarity, this CL does not drop the current mechanism where prebuilt bcp
      fragments create a dependency edge to prebuilt java or java_sdk_library
      imports. There is still some discussion around whether we can remove
      that completely (b/320711431). If we were to do that, then the
      Android.bp files will become
      
      ```
      prebuilt_sscp_fragment {name: "", contents: ["service-foo"]}
      ```
      
      Bug: 322175508
      
      Test: Added a unit test
      
      Test: In internal, lunch cf_x86_64_only_phone-next-userdebug && m
      nothing # .ninja files identical
      
      Test: In internal, created a parallel set of v2 prebuilts of
      java_sdk_library_import and prebuilt_bcp_fragments for adservices && m
      nothing # build passes
      
      Change-Id: Ia899d75e826fa1a559368d706eaa65835f748d40
      161e4687
    • Spandan Das's avatar
      Support mechanism to select a specific version of module sdk prebuilt · cc53063b
      Spandan Das authored
      This CL is the java_system_modules_import equivalent of aosp/2928483.
      
      With trunk stable, we will have multiple versions of art prebuilt apex
      in the tree. Each art apex will contribute its own module sdk, i.e. its
      own prebuilt system_modules to the build. This CL introduces a mechanism
      to selelect a specific version of prebuilt system modules using
      apex_contributions.
      
      Implementation details: Create a new source_module_name property to
      identify the root module. rdeps referring to the root module will get
      redirected if necessary.
      
      Bug: 322175508
      
      Test: Added a unit test
      Change-Id: I9f885ffa5afea96d2e6ce077264d3b207ed7e80d
      cc53063b
    • Jihoon Kang's avatar
      Introduce make var ANDROID_PUBLIC_EXPORTABLE_STUBS · 7cf2c0cc
      Jihoon Kang authored
      ANDROID_PUBLIC_STUBS currently has multiple usages in the build, in
      multiple .mk files.
      
      Instead of modifying the current functionality of ANDROID_PUBLIC_STUBS
      by replacing its value from "android_stubs_current" to
      "android_stubs_current_exportable", this change introduces
      ANDROID_PUBLIC_EXPORTABLE_STUBS, which evaluates to
      "android_stubs_current_exportable" and used only when generating the
      `full_target` in `development/build/Android.mk`.
      
      Test: patch in git_main, lunch aosp_arm-ap31-eng && m sdk dist && inspect android.jar outputs
      Bug: 323261972
      Change-Id: Ic2b03a5a4afdefb459d89f8104916446599eaf31
      7cf2c0cc
    • Spandan Das's avatar
    • Treehugger Robot's avatar
    • Almaz Mingaleev's avatar
      Revert "Enforce that soong config variables are identifiers" · 149b5d00
      Almaz Mingaleev authored
      This reverts commit d7c32db9.
      
      Reason for revert: breaks builds b/323989166
      
      Change-Id: I6937f2cbecbde39fcfe605937861510329ba44c3
      149b5d00
    • Ke-Yu Lu's avatar
      Merge changes from topic "revert-2925209-KVPWEBRQHT" into main · 196d9493
      Ke-Yu Lu authored
      * changes:
        Revert "Convert AFDO mutators to TransitionMutator"
        Revert "Remove fdoProfileMutator"
      196d9493
    • Spandan Das's avatar
      Mechanism to select a specific version of java_sdk_library_import · 23956d12
      Spandan Das authored
      This CL is the java_sdk_library_import equivalent of aosp/2928483.
      
      With trunk stable, we will have multiple apex prebuilts in the tree.
      Each apex prebuilt will have its own module sdk. This means that it is
      possible to have mutliple versions of `framework-foo` in the tree. This
      CL introduces a mechanism to select a specific versioned
      java_sdk_library prebuilt.
      
      Implementation details
      - Add a `source_module_name` property to java_sdk_library_import. This
        will identify the source equivalent of the jsl in packages/modules.
        This used to be implicit - i.e. the name without the prebuilt_ prefix.
        With multiple prebuilts, this has to become explicit.
      - Set appropriate `source_module_name`(s) in the dynamically created
        child modules. e.g. the source_module_name on sdklib.v1.stubs and
        sdklib.v2.stubs will both be sdklib.stubs, assuming
        `source_module_name` on the top-level jsl_import is sdklib
      - Add a private Created_by_java_sdk_library_name property to java_import
        and prebuilt_stubs_sources modules. This will be used to idenfity the
        top level java_sdk_library_import that was used to create these child
        modules. This is necessary because java_sdk_library_imoprt is a macro
        that creates 1:many modules. However, to avoid toil, only the
        top-level java_sdk_library_import will be listed in
        `apex_contributions`. This new property will be used for
        source/prebuilt selection in android/prebuuilt.go
      - Rename BaseModuleName in commonSdkLibraryAndImportModule to
        RootLibraryName. This is necesssary because the former is now reserved
        to identify the source equivalent of a prebuilt module (maybe we
        should rename it?)
      
      Bug: 322175508
      
      Test: Added a unit test
      Change-Id: If6aa6b0e939a07f8263874941413908383c81a78
      23956d12
    • Ke-Yu Lu's avatar
      Revert "Convert AFDO mutators to TransitionMutator" · 0be9d603
      Ke-Yu Lu authored
      Revert submission 2925209
      
      Reason for revert: b/323975183
      
      Reverted changes: /q/submissionid:2925209
      
      Change-Id: Ie907d23081817d601a1a2083347b5f683829a36c
      0be9d603
    • Ke-Yu Lu's avatar
      Revert "Remove fdoProfileMutator" · 351d3649
      Ke-Yu Lu authored
      Revert submission 2925209
      
      Reason for revert: b/323975183
      
      Reverted changes: /q/submissionid:2925209
      
      Change-Id: I33b2e71ba7b36e12e5c491e0ad14a7f7df3edd78
      351d3649
    • Cole Faust's avatar
    • Kiyoung Kim's avatar
      e5b8b973
    • Zi Wang's avatar
    • Cole Faust's avatar
      Enforce that soong config variables are identifiers · d7c32db9
      Cole Faust authored
      I want to be able to use certain characters to separate a namespace
      from a variable, but currently it's possible for soong config namespaces
      and variables to have any character in them.
      
      Restrict them to just identifiers, which should cover all of our
      existing usages.
      
      Bug: 323382414
      Test: Presubmits
      Change-Id: I6d55dd3378ac4d257efde450189b81a4aa3932c3
      d7c32db9
  3. Feb 05, 2024
  4. Feb 03, 2024
    • Joe Onorato's avatar
      Add new soongdbg command and a big json file full of soong debugging info. · e5ed3474
      Joe Onorato authored
      In order to use soongdbg, you must run analysis with GENERATE_SOONG_DEBUG=true set
      in the environment.
      
      Test: GENERATE_SOONG_DEBUG=true m nothing ; soongdbg ...
      Change-Id: If43676fe2784f05cd87c0ecb4a46ab676b91023f
      e5ed3474
    • Aditya Kumar's avatar
    • Treehugger Robot's avatar
    • Spandan Das's avatar
      Do not replace the direct edge between rdeps and java_sdk_library · 81d95c58
      Spandan Das authored
      android/prebuilt.go#isSelected has a special-case inside it to ignore
      apex_contributions contents for the top-level java_sdk_library hook.
      This was necessary because even though we might want source stubs in
      next builds, we still needed the top-level prebuilt hook to be active to
      emit the dexpreopt rules to .mk.
      
      This worked fine for rdeps that create a dependency edge on the child
      stub modules of java_sdk_library. Notable examples include the full
      android api stubs created by f/b/api.go. In postdeps mutator, these
      expanded deps get rewritten to source/prebuilt if necesssry.
      
      The exception to this are workflows which depend on the top-level hook
      directly via `libs`. We resolve these rdeps to an appropriate provider
      during GenerateAndroidBuildActions stage. This meant that rdeps were
      getting prebuilt stubs of these even in next builds.
      
      Bug: 323454855
      
      Test: Added a unit test
      
      Test: lunch cf_x86_64_only_phone-next-userdebug
      Test: aninja -t query
      out/soong/.intermediates/packages/modules/Permission/SafetyCenter/Config/safety-center-config/android_common/javac/safety-center-config.jar
      | grep prebilts/module_sdk # empty now
      
      Change-Id: Id91333d88055519f3c58ab40466f9628085f5180
      81d95c58
  5. Feb 02, 2024
    • Colin Cross's avatar
      Follow signature update to ExtendMatchingProperties · 1e7e0432
      Colin Cross authored
      The order function passed to ExtendMatchingProperites no longer takes
      a property, dstValue or srcValue parameter.
      
      Test: builds
      Change-Id: I19fc554f705fbf42100f0a38df87e2d1fb2454ec
      1e7e0432
    • Colin Cross's avatar
      Optimize mutator contexts · 984223fd
      Colin Cross authored
      Mutator contexts are created for every module, and in the case of
      transition mutator contexts for every dependency of every module.
      Unlike the Blueprint mutator contexts that they wrap, the Soong
      mutator contexts can be relatively large.  Add global pools for all
      of them that can avoid the repeated allocations.
      
      Test: SOONG_PROFILE_MEM=/tmp/mem.pprof m nothing
      Change-Id: I64a5f3c91292cff6352300f99c11ac50c713f96d
      984223fd
    • Colin Cross's avatar
      Optimize InstallPath.String() · c0e42d5d
      Colin Cross authored
      Every InstallPath will have String() called on it eventually, often
      more than once if it is in a slice that is sorted.  Precompute the
      full path so it can be returned from InstallPath.String() without
      recomputing every time.
      
      Test: paths_test.go
      Change-Id: I1ed0a3801806854356865c0a5fc35d5cf6d349fe
      c0e42d5d
    • Aditya Kumar's avatar
      Revert^2 "Update clang version to clang-r510928" · ef7c121a
      Aditya Kumar authored
      22686bab
      
      Change-Id: I1117546bb71548e1146c6ae43419b6aef772f812
      ef7c121a
Loading