Commit graph

9 commits

Author SHA1 Message Date
Yabin Cui
01c4456ce2 Enable -funique-internal-linkage-names when afdo=true
We used to enable unique names only when a profile is available.
But A profile generated for a binary without unique names doesn't
work well when building a binary with unique names. To avoid a
chicken-and-egg problem, this CL enables the flag when afdo=true,
whether a profile exists or not.

Bug: 241523910
Test: build
Change-Id: I74d834510d81d2db76e34d0488c74a60e1fcecd5
2023-04-21 14:41:55 -07:00
Vinh Tran
cde1016aff Reimplement afdo support for rust
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
2023-03-31 17:55:16 -04:00
Vinh Tran
44cb78c988 Implement fdo_profile module type
Introducing fdo_profile module type to reimplement the afdo support in cc moduels. This change allows the feature to be compatible with Bazel migration.

How it works:

PreDepsMutators:
  * BeginMutator: If non-static cc modules sets afdo prop, search and add corresponding fdo_profile module as a dep with fdoProfileTag
  * fdoProfileMutator:
    * If in fdo_profile module, set FdoProfileProvider with full path to profile
    * If in cc module, read FdoProfileProvider from dep with fdoProfileTag and set FdoProfileInfo.Path to FdoProfilePath field

PostDepsMutators:
  * afdoDepsMutator: If a module has FdoProfilePath set, walk to its static deps and set itself to the deps' AfdoRdeps
  * afdoMutator: If a static dep has AfdoRDeps set, create afdo variant.

Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: go test
Bug: b/267229065
Change-Id: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
Merged-In: I687d798a02d9743c92804fea36fb4ae3a7a0e5e3
2023-03-31 17:52:01 -04:00
Vinh Tran
2e7b0fd271 Add tests to verify more use cases of afdo in cc and rust
Test: go test
Bug: 267229065
Change-Id: I4aa9538e92aa27e0f842bdce3725bc82739196cb
2023-03-27 14:01:40 -04:00
Treehugger Robot
463c15de15 Merge "Make more cc tests parallel" 2022-12-20 19:38:58 +00:00
Vinh Tran
9c6080cc4b Add Soong test to verify runtime_deps doesn't have afdo variant
Test: go test
Change-Id: If6ef4f5ee529b322a251b11ebdceca4bbcacdd63
2022-12-15 15:31:31 +00:00
Liz Kammer
7c5d1591bc Make more cc tests parallel
Test: go test soong cc tests
Change-Id: I5ade33b1579ae46571728e051471147e627a7d38
2022-12-05 13:43:29 -05:00
Liz Kammer
8c8e8d5207 Add more afdo testing
Test: go test soong cc tests
Change-Id: If7b812962f5dfbf51c799225356862cbaea33e5d
2022-12-02 10:40:43 -05:00
Yi Kong
d5954a2a92 Add tests for afdo.go
Bug: 79161490
Test: presubmit
Change-Id: I686b5226aad5011ab30a0a105f8c7866cd610502
2022-01-26 17:46:33 +08:00