diff options
author | Spandan Das <spandandas@google.com> | 2023-03-11 01:20:32 +0000 |
---|---|---|
committer | Spandan Das <spandandas@google.com> | 2023-03-11 01:29:48 +0000 |
commit | 0860654a6751bcf3b554b334c8753d64ae758743 (patch) | |
tree | b9db03691594a729d4bcaf31e35bbc5d8ac3c6fc | |
parent | 0daf08c1ae8fbcbc465d097b9153ee565d8b55c7 (diff) | |
download | orchestrator-0860654a6751bcf3b554b334c8753d64ae758743.tar.gz |
Make headers an inorder dep of cc_api_variant.src
Currently, it is an inorder dep of the top level cc_api_library.src.
Since rdeps link against cc_api_variant.src, this CL ensures that header
files are assembled in out/api_surfaces before rdeps are compiled.
Test: rm -rf out && multitree_build
system/out/soong/.intermediates/frameworks/rs/cpu_ref/libRSCpuRef/android_vendor.UpsideDownCake_arm_armv8-a_cortex-a53_shared/obj/frameworks/rs/cpu_ref/rsCpuScript.o
Change-Id: I1d117cd34a23dee045dde01d5f39dbf2f8e0fbe8
-rw-r--r-- | core/cc/api_assembly.py | 1 | ||||
-rw-r--r-- | core/cc/library.py | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/core/cc/api_assembly.py b/core/cc/api_assembly.py index 73d0bf1..8bc4ea3 100644 --- a/core/cc/api_assembly.py +++ b/core/cc/api_assembly.py @@ -317,6 +317,7 @@ class CcApiAssemblyContext(object): out=output_so, frontend=context.tools.clang_cxx(), ) + link_context.add_implicits(api_deps) self._linker.link(ninja, link_context) # TODO: Short term hack to make the stub library available to diff --git a/core/cc/library.py b/core/cc/library.py index f7c908b..fb3576b 100644 --- a/core/cc/library.py +++ b/core/cc/library.py @@ -59,6 +59,10 @@ class LinkContext(): self.flags = flags self.out = out self.frontend = frontend + self.implicits = [frontend] + + def add_implicits(self, implicits: List[str]): + self.implicits.extend(implicits) class Linker(): @@ -76,7 +80,7 @@ class Linker(): link_action = BuildAction(output=link_context.out, inputs=link_context.objs, rule=link_rule.name, - implicits=[link_context.frontend] + implicits=link_context.implicits, ) link_action.add_variable("ldFrontend", link_context.frontend) link_action.add_variable("ldFlags", link_context.flags) |