Skip to content
  1. Sep 08, 2021
    • Lukacs T. Berki's avatar
      Refactor the creation of soong_build calls. · 89fcdcb7
      Lukacs T. Berki authored
      They were a bit repetitive.
      
      In addition, make the environment checks more correct; they could
      probably use an integration test or two to make sure that when the
      environment changes, exactly those outputs are rebuilt that need to be,
      but for now, this is an improvement already.
      
      Test: Presubmits.
      Change-Id: Idd79b81ca6975d57d00e5bf4699d266152505ff8
      89fcdcb7
    • Lukacs T. Berki's avatar
      Invoke soong_docs from the bootstrap Ninja file. · c6012f36
      Lukacs T. Berki authored
      This makes soong_ui the only place where soong_build is invoked, thus
      greatly simplifying the conceptual model of the build.
      
      It comes with the slight limitation that now soong_docs (and queryview
      and the JSON module graph) are not Make targets anymore, but I suppose
      that's an acceptable loss.
      
      The only place where someone depended on soong_docs from a Makefile is
      removed in a separate change.
      
      Test: Presubmits.
      Change-Id: I3f9ac327725c15d84de725d05e3cdde1da3dcbe2
      c6012f36
  2. Aug 24, 2021
  3. Jun 29, 2021
  4. Jan 21, 2021
    • Liz Kammer's avatar
      Add conditions_default for soong config variables. · 432bd598
      Liz Kammer authored
      Each variable can specify a conditions_default for properties to be used
      when the variable is not set, not set to a true value (for bools), or is
      set to a value that is not present in the module (for strings).
      
      Test: m nothing
      Test: go test soong tests
      Change-Id: I76ec026da2369b407f0f530f77760f530e7958fc
      432bd598
  5. May 13, 2020
    • Paul Duffin's avatar
      Add //visibility:override to allow control over inheritance · 31c43e7f
      Paul Duffin authored
      Visibility rules can be 'inherited' in one of two ways. Either from
      defaults or from a module that called ctx.CreateModule(...).
      Previously, in both cases the inheriting module could only append
      additional visibility rules to the end of the inherited rules. That
      made it impossible to restrict the visibility by removing or ignore
      inherited rules.
      
      The //visibility:override rectifies that by allowing the inheriting
      module to ignore all the rules that they would have inherited. It can
      only go at the beginning of a list of rules specified in a module but
      after defaults are applied it can end up in the middle of a list of
      rules. In that case it behaves as if all the rules up to and including
      the //visibility:override rule were discarded.
      
      It can be used with //visibility:private to override
      //visibility:public and vice versa.
      
      Bug: 155787200
      Test: m nothing
      Merged-In: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f
      Change-Id: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f
      (cherry picked from commit 51084ff6)
      31c43e7f
  6. May 12, 2020
    • Paul Duffin's avatar
      Add //visibility:override to allow control over inheritance · 51084ff6
      Paul Duffin authored
      Visibility rules can be 'inherited' in one of two ways. Either from
      defaults or from a module that called ctx.CreateModule(...).
      Previously, in both cases the inheriting module could only append
      additional visibility rules to the end of the inherited rules. That
      made it impossible to restrict the visibility by removing or ignore
      inherited rules.
      
      The //visibility:override rectifies that by allowing the inheriting
      module to ignore all the rules that they would have inherited. It can
      only go at the beginning of a list of rules specified in a module but
      after defaults are applied it can end up in the middle of a list of
      rules. In that case it behaves as if all the rules up to and including
      the //visibility:override rule were discarded.
      
      It can be used with //visibility:private to override
      //visibility:public and vice versa.
      
      Bug: 155787200
      Test: m nothing
      Change-Id: I8a9c9c5a1bdceaee387c08864ae2b34629e0d46f
      51084ff6
  7. Apr 09, 2020
    • Dan Willemsen's avatar
      soong config: add value_variable substitution · ec8d490d
      Dan Willemsen authored
      There are some cases that aren't handled with the existing variable
      types for booleans or known lists of strings. Similarly to our
      product_variables that uses %s / %d for things like
      PLATFORM_SDK_VERSION, allow vendors to define their own config variables
      to be substituted into properties.
      
      For example, some of the makefiles that I've attempted to convert had
      the option to pass in version numbers from the board, or the default
      display size:
      
        -DDISPLAY_VERSION=550
        -DDISP_H=1080
      
      These examples happen to be integers, but since our configuration
      language (make) doesn't support numbers, %s works just as well.
      
      This change will allow the above to be represented using:
      
        soong_config_module_type {
            name: "acme_cc_defaults",
            module_type: "cc_defaults",
            config_namespace: "acme",
            value_variables: [
                "DISPLAY_VERSION",
      	  "DISP_H",
            ],
            properties: ["cflags"],
        }
      
        acme_cc_defaults {
            name: "my_defaults",
            soong_config_variables: {
                DISPLAY_VERSION: {
      	      cflags: ["-DDISPLAY_VERSION=%s"],
      	  },
      	  DISP_H: {
      	      cflags: ["-DDISP_H=%s"],
      	  }
            },
        }
      
      Bug: 153161144
      Test: built-in tests
      Change-Id: I18f35746b5cc39c304a136980249e886d38c6df6
      Merged-In: I18f35746b5cc39c304a136980249e886d38c6df6
      (cherry picked from commit b0935db8)
      ec8d490d
  8. Apr 03, 2020
    • Dan Willemsen's avatar
      soong_config: bool_variables shortcut · 1934adc0
      Dan Willemsen authored
      Using a lot of boolean variables can become very verbose without adding
      really any new information:
      
            variables: ["a", "b", "c"],
        }
      
        soong_config_bool_variable {
            name: "a",
        }
      
        soong_config_bool_variable {
            name: "b",
        }
      
        soong_config_bool_variable {
            name: "c",
        }
      
      Now turns into:
      
            bool_variables: ["a", "b", "c"],
        }
      
      Bug: 153161144
      Test: built-in tests
      Change-Id: If5455a38433431c7ecbce1e5b32cfbb47f42602a
      Merged-In: If5455a38433431c7ecbce1e5b32cfbb47f42602a
      (cherry picked from commit 2b8b89cf)
      1934adc0
  9. Mar 24, 2020
    • Dan Willemsen's avatar
      soong config: add value_variable substitution · b0935db8
      Dan Willemsen authored
      There are some cases that aren't handled with the existing variable
      types for booleans or known lists of strings. Similarly to our
      product_variables that uses %s / %d for things like
      PLATFORM_SDK_VERSION, allow vendors to define their own config variables
      to be substituted into properties.
      
      For example, some of the makefiles that I've attempted to convert had
      the option to pass in version numbers from the board, or the default
      display size:
      
        -DDISPLAY_VERSION=550
        -DDISP_H=1080
      
      These examples happen to be integers, but since our configuration
      language (make) doesn't support numbers, %s works just as well.
      
      This change will allow the above to be represented using:
      
        soong_config_module_type {
            name: "acme_cc_defaults",
            module_type: "cc_defaults",
            config_namespace: "acme",
            value_variables: [
                "DISPLAY_VERSION",
      	  "DISP_H",
            ],
            properties: ["cflags"],
        }
      
        acme_cc_defaults {
            name: "my_defaults",
            soong_config_variables: {
                DISPLAY_VERSION: {
      	      cflags: ["-DDISPLAY_VERSION=%s"],
      	  },
      	  DISP_H: {
      	      cflags: ["-DDISP_H=%s"],
      	  }
            },
        }
      
      Test: built-in tests
      Change-Id: I18f35746b5cc39c304a136980249e886d38c6df6
      b0935db8
    • Dan Willemsen's avatar
      soong_config: bool_variables shortcut · 2b8b89cf
      Dan Willemsen authored
      Using a lot of boolean variables can become very verbose without adding
      really any new information:
      
            variables: ["a", "b", "c"],
        }
      
        soong_config_bool_variable {
            name: "a",
        }
      
        soong_config_bool_variable {
            name: "b",
        }
      
        soong_config_bool_variable {
            name: "c",
        }
      
      Now turns into:
      
            bool_variables: ["a", "b", "c"],
        }
      
      Test: built-in tests
      Change-Id: If5455a38433431c7ecbce1e5b32cfbb47f42602a
      2b8b89cf
  10. Jan 25, 2020
    • Colin Cross's avatar
      Simplify vendor conditionals · 9d34f358
      Colin Cross authored
      Support vendor conditionals with no Go code.
      
      Test: TestSoongConfigModule
      Change-Id: I42546e7f17324921ada80f4d8e1cd399830f8dfc
      9d34f358
  11. Dec 09, 2019
  12. Nov 25, 2019
  13. Nov 16, 2019
  14. Aug 06, 2019
  15. Jul 25, 2019
  16. Jul 03, 2019
    • Colin Cross's avatar
      Allow debugging with SOONG_DELVE=<listen addr> · aa812d12
      Colin Cross authored
      Allow running Soong in a headless delve debugger by passing
      SOONG_DELVE=<listen addr> in the environment.
      
      Bug: 80165685
      Test: SOONG_DELVE=:1234 m nothing
      Change-Id: Icfc893c8a8354a9bbc99112d9c83259cb41906d1
      aa812d12
  17. Jun 27, 2019
    • Paul Duffin's avatar
      Inherit default_visibility from parent package · e484f47a
      Paul Duffin authored
      Enhances the visibility mechanism to use the default_visibility
      property of the closest ancestor package that has the property
      specified.
      
      Bug: 133290645
      Test: m droid
      Change-Id: I7248e9034a73894ac8d514f913316438c4d7c079
      e484f47a
    • Paul Duffin's avatar
      Allow default visibility to be set per package · e2453c70
      Paul Duffin authored
      Adds a package module type with a default_visibility property. The
      package module type can only be specified once per package.
      
      Bug: 133290645
      Test: m droid
      Change-Id: Ibb2fb499c9ea88ecaa662d3cd2cbde478e4b9a4b
      e2453c70
  18. May 28, 2019
    • Colin Cross's avatar
      Document escaping · e4a0584f
      Colin Cross authored
      Document that strings can contain double quotes escaped as \", and
      the droiddoc args argument can contain a dollar signe escaped as $$.
      
      Test: none
      Change-Id: I91d3fa73f484094c9ce8cbecc93189850856de84
      e4a0584f
  19. May 24, 2019
    • Martin Stjernholm's avatar
      Allow //visibility:public to override other visibility rules. · 226b20dc
      Martin Stjernholm authored
      However only allow it when they are merged from different defaults.
      
      Extend the tests to cover that and other cases with visibilities in
      defaults.
      
      Also avoid dumping the whole visibility spec in the error message when a
      visibility check fails, because it gets noisy for long visibility lists, and
      can be confusing when //visibility:public gets merged with other visibility
      rules.
      
      Test: Soong self test
      Bug: 112158820
      Bug: 130796911
      Change-Id: I242513975a3f824b9ea2eab5b94b194b9af2481b
      226b20dc
  20. Apr 26, 2019
    • Paul Duffin's avatar
      Add visibility support · 2e61fa6e
      Paul Duffin authored
      Implementation uploaded for review. Includes unit tests but does not
      yet handle prebuilts, that will come in a future change once some
      more general issues with prebuilts and namespaces is resolved.
      
      See README.md#Visibility for details of what this does and how to use
      it.
      
      Bug: 112158820
      Test: add visibility rules for core library modules, make core-tests
      Change-Id: I8ec980554398ad6f2d42043ce518f811a35da679
      2e61fa6e
  21. Mar 01, 2019
  22. Feb 09, 2019
    • Mikhail Naganov's avatar
      Docs: update path to soong_build.html · e0d0a453
      Mikhail Naganov authored
      On the recent versions, the module types help
      is generated into $OUT_DIR/soong/docs/soong_build.html
      
      Test: make && ls -l out/soong/docs/soong_build.html
      Change-Id: Ib7522a417fd5467f19d7393672a592d349f276f4
      e0d0a453
  23. Jan 17, 2019
  24. Sep 25, 2018
  25. Jul 09, 2018
  26. Apr 30, 2018
  27. Apr 24, 2018
    • 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
  28. Feb 07, 2018
  29. Dec 05, 2017
  30. Nov 06, 2017
  31. Jan 14, 2017
  32. Dec 17, 2016
    • Colin Cross's avatar
      Support filegroups · 068e0fea
      Colin Cross authored
      filegroup is a module that contains a list of files, and can be used
      to export files across package boundaries.  filegroups (and genrules)
      can be referenced from srcs properties of other modules using the
      syntax ":module".
      
      Test: m -j
      Change-Id: I3d6fc4819c0b4225b474e0ad42f0d947f55a5961
      068e0fea
  33. Sep 26, 2016
    • Colin Cross's avatar
      Update readme · 024c32e9
      Colin Cross authored
      Use go/Android.bp link, add a little more on androidmk conversions.
      
      Test: none
      Change-Id: Ibe2be4ad54b6d9a8954d7efbb40d04dc54c8dbf2
      024c32e9
  34. Jul 18, 2016
Loading