Merge "Use -fdebug-default-version=4 for assembly files" am: 49fc44f6b2 am: 96aad8abcf

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

Change-Id: Ib8863b915723faae69be8f11abc9b38e5f5224f6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Colin Cross 2022-06-10 20:32:39 +00:00 committed by Automerger Merge Worker
commit 0d7bd9deb6
2 changed files with 5 additions and 1 deletions

View file

@ -4076,7 +4076,7 @@ func TestIncludeDirectoryOrdering(t *testing.T) {
{
name: "assemble",
src: "foo.s",
expected: combineSlices(baseExpectedFlags, []string{"-D__ASSEMBLY__"}, expectedIncludes, lastIncludes),
expected: combineSlices(baseExpectedFlags, []string{"-D__ASSEMBLY__", "-fdebug-default-version=4"}, expectedIncludes, lastIncludes),
},
}

View file

@ -495,6 +495,10 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
flags.Global.AsFlags = append(flags.Global.AsFlags, "-D__ASSEMBLY__")
// TODO(b/235105792): override global -fdebug-default-version=5, it is causing $TMPDIR to
// end up in the dwarf data for crtend_so.S.
flags.Global.AsFlags = append(flags.Global.AsFlags, "-fdebug-default-version=4")
flags.Global.CppFlags = append(flags.Global.CppFlags, tc.Cppflags())
flags.Global.YasmFlags = append(flags.Global.YasmFlags, tc.YasmFlags())