diff options
| author | 2022-01-24 17:22:45 -0800 | |
|---|---|---|
| committer | 2022-01-24 17:33:05 -0800 | |
| commit | 018cbebd7149afb14a60e84e4fd9c53ff63cd676 (patch) | |
| tree | 0fe1a3c4de265948edf8b34637445cacb43fd1b3 /rust/rust.go | |
| parent | fe605e14ee71dae43d384968fffd3aea7ac53bba (diff) | |
Support genrules as CrtBegin and CrtEnd in rust
Musl will use a genrule output as a linker script in CrtBegin,
support genrules as Crt* dependencies.
This is equivalent to Ie384089d26459797d0b4b5fef84846507fc508ad
in cc.
Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibc08fdcff7a6bca2a1ec05b781ce929080e211bd
Diffstat (limited to 'rust/rust.go')
| -rw-r--r-- | rust/rust.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/rust.go b/rust/rust.go index ee573fa43..0a941bf2d 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -1224,6 +1224,13 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { lib.exportLinkDirs(linkPath) lib.exportLinkObjects(linkObject.String()) } + } else { + switch { + case depTag == cc.CrtBeginDepTag: + depPaths.CrtBegin = append(depPaths.CrtBegin, android.OutputFileForModule(ctx, dep, "")) + case depTag == cc.CrtEndDepTag: + depPaths.CrtEnd = append(depPaths.CrtEnd, android.OutputFileForModule(ctx, dep, "")) + } } if srcDep, ok := dep.(android.SourceFileProducer); ok { |