Add CcUnstrippedInfo provider and use it in mixed builds
The build uses unstripped binary/shared library to extract function signatures, so for each each target of this kind Bazel should return its unstripped version, too. Fixes: 220164721 Test: treehugger Change-Id: Id5f6143340519bf2ae98791a9e981d1306bb08d1
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"android/soong/bazel/cquery"
|
||||
"testing"
|
||||
|
||||
"android/soong/android"
|
||||
@@ -30,8 +31,11 @@ cc_binary {
|
||||
config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
|
||||
config.BazelContext = android.MockBazelContext{
|
||||
OutputBaseDir: "outputbase",
|
||||
LabelToOutputFiles: map[string][]string{
|
||||
"//foo/bar:bar": []string{"foo"},
|
||||
LabelToCcBinary: map[string]cquery.CcUnstrippedInfo{
|
||||
"//foo/bar:bar": cquery.CcUnstrippedInfo{
|
||||
OutputFile: "foo",
|
||||
UnstrippedOutput: "foo.unstripped",
|
||||
},
|
||||
},
|
||||
}
|
||||
ctx := testCcWithConfig(t, config)
|
||||
@@ -46,7 +50,7 @@ cc_binary {
|
||||
android.AssertDeepEquals(t, "output files", expectedOutputFiles, outputFiles.Strings())
|
||||
|
||||
unStrippedFilePath := binMod.(*Module).UnstrippedOutputFile()
|
||||
expectedUnStrippedFile := "outputbase/execroot/__main__/foo"
|
||||
expectedUnStrippedFile := "outputbase/execroot/__main__/foo.unstripped"
|
||||
android.AssertStringEquals(t, "Unstripped output file", expectedUnStrippedFile, unStrippedFilePath.String())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user