Merge "Remove warnings about mismatched types with builtins for stubs." am: b69919c70d

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2081784

Change-Id: Ia181284ebf36d70f26d7aa4656bec272c7ad4402
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-04-29 22:53:21 +00:00
committed by Automerger Merge Worker

View File

@@ -284,6 +284,10 @@ func parseNativeAbiDefinition(ctx ModuleContext, symbolFile string,
}
func compileStubLibrary(ctx ModuleContext, flags Flags, src android.Path) Objects {
// libc/libm stubs libraries end up mismatching with clang's internal definition of these
// functions (which have noreturn attributes and other things). Because we just want to create a
// stub with symbol definitions, and types aren't important in C, ignore the mismatch.
flags.Local.ConlyFlags = append(flags.Local.ConlyFlags, "-fno-builtin")
return compileObjs(ctx, flagsToBuilderFlags(flags), "",
android.Paths{src}, nil, nil, nil, nil)
}