Merge "Fix the snapshot handling of generated headers" am: efa0f00706
am: 7c7d2fc156
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599158 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I3570df262bc63eaa698ce395f9ce31edd5d9aeaf
This commit is contained in:
commit
3b2020b8a3
|
@ -258,42 +258,52 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b
|
||||||
// values where necessary.
|
// values where necessary.
|
||||||
for _, propertyInfo := range includeDirProperties {
|
for _, propertyInfo := range includeDirProperties {
|
||||||
// Calculate the base directory in the snapshot into which the files will be copied.
|
// Calculate the base directory in the snapshot into which the files will be copied.
|
||||||
// lib.ArchType is "" for common properties.
|
// lib.archType is "" for common properties.
|
||||||
targetDir := filepath.Join(libInfo.OsPrefix(), libInfo.archType, propertyInfo.snapshotDir)
|
targetDir := filepath.Join(libInfo.OsPrefix(), libInfo.archType, propertyInfo.snapshotDir)
|
||||||
|
|
||||||
propertyName := propertyInfo.propertyName
|
propertyName := propertyInfo.propertyName
|
||||||
|
|
||||||
// Iterate over each path in one of the include directory properties.
|
// Iterate over each path in one of the include directory properties.
|
||||||
for _, path := range propertyInfo.pathsGetter(libInfo) {
|
for _, path := range propertyInfo.pathsGetter(libInfo) {
|
||||||
|
inputPath := path.String()
|
||||||
|
|
||||||
|
// Map the input path to a snapshot relative path. The mapping is independent of the module
|
||||||
|
// that references them so that if multiple modules within the same snapshot export the same
|
||||||
|
// header files they end up in the same place in the snapshot and so do not get duplicated.
|
||||||
|
targetRelativePath := inputPath
|
||||||
|
if isGeneratedHeaderDirectory(path) {
|
||||||
|
// Remove everything up to the .intermediates/ from the generated output directory to
|
||||||
|
// leave a module relative path.
|
||||||
|
base := android.PathForIntermediates(sdkModuleContext, "")
|
||||||
|
targetRelativePath = android.Rel(sdkModuleContext, base.String(), inputPath)
|
||||||
|
}
|
||||||
|
|
||||||
|
snapshotRelativePath := filepath.Join(targetDir, targetRelativePath)
|
||||||
|
|
||||||
// Copy the files/directories when necessary.
|
// Copy the files/directories when necessary.
|
||||||
if propertyInfo.copy {
|
if propertyInfo.copy {
|
||||||
if propertyInfo.dirs {
|
if propertyInfo.dirs {
|
||||||
// When copying a directory glob and copy all the headers within it.
|
// When copying a directory glob and copy all the headers within it.
|
||||||
// TODO(jiyong) copy headers having other suffixes
|
// TODO(jiyong) copy headers having other suffixes
|
||||||
headers, _ := sdkModuleContext.GlobWithDeps(path.String()+"/**/*.h", nil)
|
headers, _ := sdkModuleContext.GlobWithDeps(inputPath+"/**/*.h", nil)
|
||||||
for _, file := range headers {
|
for _, file := range headers {
|
||||||
src := android.PathForSource(sdkModuleContext, file)
|
src := android.PathForSource(sdkModuleContext, file)
|
||||||
dest := filepath.Join(targetDir, file)
|
|
||||||
|
// The destination path in the snapshot is constructed from the snapshot relative path
|
||||||
|
// of the input directory and the input directory relative path of the header file.
|
||||||
|
inputRelativePath := android.Rel(sdkModuleContext, inputPath, file)
|
||||||
|
dest := filepath.Join(snapshotRelativePath, inputRelativePath)
|
||||||
builder.CopyToSnapshot(src, dest)
|
builder.CopyToSnapshot(src, dest)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, just copy the files.
|
// Otherwise, just copy the file to its snapshot relative path.
|
||||||
dest := filepath.Join(targetDir, libInfo.name, path.Rel())
|
builder.CopyToSnapshot(path, snapshotRelativePath)
|
||||||
builder.CopyToSnapshot(path, dest)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only directories are added to a property.
|
// Only directories are added to a property.
|
||||||
if propertyInfo.dirs {
|
if propertyInfo.dirs {
|
||||||
var snapshotPath string
|
includeDirs[propertyName] = append(includeDirs[propertyName], snapshotRelativePath)
|
||||||
if isGeneratedHeaderDirectory(path) {
|
|
||||||
snapshotPath = filepath.Join(targetDir, libInfo.name)
|
|
||||||
} else {
|
|
||||||
snapshotPath = filepath.Join(targetDir, path.String())
|
|
||||||
}
|
|
||||||
|
|
||||||
includeDirs[propertyName] = append(includeDirs[propertyName], snapshotPath)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -330,9 +340,6 @@ type nativeLibInfoProperties struct {
|
||||||
|
|
||||||
memberType *librarySdkMemberType
|
memberType *librarySdkMemberType
|
||||||
|
|
||||||
// The name of the library, is not exported as this must not be changed during optimization.
|
|
||||||
name string
|
|
||||||
|
|
||||||
// archType is not exported as if set (to a non default value) it is always arch specific.
|
// archType is not exported as if set (to a non default value) it is always arch specific.
|
||||||
// This is "" for common properties.
|
// This is "" for common properties.
|
||||||
archType string
|
archType string
|
||||||
|
@ -419,7 +426,6 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
|
||||||
exportedIncludeDirs, exportedGeneratedIncludeDirs := android.FilterPathListPredicate(
|
exportedIncludeDirs, exportedGeneratedIncludeDirs := android.FilterPathListPredicate(
|
||||||
exportedInfo.IncludeDirs, isGeneratedHeaderDirectory)
|
exportedInfo.IncludeDirs, isGeneratedHeaderDirectory)
|
||||||
|
|
||||||
p.name = variant.Name()
|
|
||||||
p.archType = ccModule.Target().Arch.ArchType.String()
|
p.archType = ccModule.Target().Arch.ArchType.String()
|
||||||
|
|
||||||
// Make sure that the include directories are unique.
|
// Make sure that the include directories are unique.
|
||||||
|
|
|
@ -499,15 +499,15 @@ cc_prebuilt_library_shared {
|
||||||
arm64: {
|
arm64: {
|
||||||
srcs: ["arm64/lib/mynativelib.so"],
|
srcs: ["arm64/lib/mynativelib.so"],
|
||||||
export_include_dirs: [
|
export_include_dirs: [
|
||||||
"arm64/include_gen/mynativelib",
|
"arm64/include_gen/generated_foo/gen",
|
||||||
"arm64/include_gen/mynativelib",
|
"arm64/include_gen/generated_foo/gen/protos",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
arm: {
|
arm: {
|
||||||
srcs: ["arm/lib/mynativelib.so"],
|
srcs: ["arm/lib/mynativelib.so"],
|
||||||
export_include_dirs: [
|
export_include_dirs: [
|
||||||
"arm/include_gen/mynativelib",
|
"arm/include_gen/generated_foo/gen",
|
||||||
"arm/include_gen/mynativelib",
|
"arm/include_gen/generated_foo/gen/protos",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -516,9 +516,9 @@ cc_prebuilt_library_shared {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so
|
.intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so
|
||||||
.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm64/include_gen/mynativelib/generated_foo/protos/foo/bar.h
|
.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm64/include_gen/generated_foo/gen/generated_foo/protos/foo/bar.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so
|
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so
|
||||||
.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm/include_gen/mynativelib/generated_foo/protos/foo/bar.h
|
.intermediates/generated_foo/gen/generated_foo/protos/foo/bar.h -> arm/include_gen/generated_foo/gen/generated_foo/protos/foo/bar.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1119,11 +1119,11 @@ cc_prebuilt_library_shared {
|
||||||
arch: {
|
arch: {
|
||||||
arm64: {
|
arm64: {
|
||||||
srcs: ["arm64/lib/mynativelib.so"],
|
srcs: ["arm64/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["arm64/include_gen/mynativelib"],
|
export_include_dirs: ["arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
arm: {
|
arm: {
|
||||||
srcs: ["arm/lib/mynativelib.so"],
|
srcs: ["arm/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["arm/include_gen/mynativelib"],
|
export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1131,13 +1131,13 @@ cc_prebuilt_library_shared {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so
|
.intermediates/mynativelib/android_arm64_armv8-a_shared/mynativelib.so -> arm64/lib/mynativelib.so
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_shared/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so
|
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/mynativelib.so -> arm/lib/mynativelib.so
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_shared/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1321,12 +1321,12 @@ cc_prebuilt_library_shared {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.so"],
|
srcs: ["x86_64/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
linux_glibc_x86: {
|
linux_glibc_x86: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86/lib/mynativelib.so"],
|
srcs: ["x86/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["x86/include_gen/mynativelib"],
|
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1353,12 +1353,12 @@ cc_prebuilt_library_shared {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.so"],
|
srcs: ["x86_64/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
linux_glibc_x86: {
|
linux_glibc_x86: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86/lib/mynativelib.so"],
|
srcs: ["x86/lib/mynativelib.so"],
|
||||||
export_include_dirs: ["x86/include_gen/mynativelib"],
|
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1385,13 +1385,13 @@ sdk_snapshot {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_shared/mynativelib.so -> x86_64/lib/mynativelib.so
|
.intermediates/mynativelib/linux_glibc_x86_64_shared/mynativelib.so -> x86_64/lib/mynativelib.so
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_shared/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_shared/mynativelib.so -> x86/lib/mynativelib.so
|
.intermediates/mynativelib/linux_glibc_x86_shared/mynativelib.so -> x86/lib/mynativelib.so
|
||||||
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_shared/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1569,11 +1569,11 @@ cc_prebuilt_library_static {
|
||||||
arch: {
|
arch: {
|
||||||
arm64: {
|
arm64: {
|
||||||
srcs: ["arm64/lib/mynativelib.a"],
|
srcs: ["arm64/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["arm64/include_gen/mynativelib"],
|
export_include_dirs: ["arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
arm: {
|
arm: {
|
||||||
srcs: ["arm/lib/mynativelib.a"],
|
srcs: ["arm/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["arm/include_gen/mynativelib"],
|
export_include_dirs: ["arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1581,13 +1581,13 @@ cc_prebuilt_library_static {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_static/mynativelib.a -> arm64/lib/mynativelib.a
|
.intermediates/mynativelib/android_arm64_armv8-a_static/mynativelib.a -> arm64/lib/mynativelib.a
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm64/include_gen/mynativelib/android_arm64_armv8-a_static/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_static/mynativelib.a -> arm/lib/mynativelib.a
|
.intermediates/mynativelib/android_arm_armv7-a-neon_static/mynativelib.a -> arm/lib/mynativelib.a
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h -> arm/include_gen/mynativelib/android_arm_armv7-a-neon_static/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1638,12 +1638,12 @@ cc_prebuilt_library_static {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.a"],
|
srcs: ["x86_64/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
linux_glibc_x86: {
|
linux_glibc_x86: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86/lib/mynativelib.a"],
|
srcs: ["x86/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86/include_gen/mynativelib"],
|
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1669,12 +1669,12 @@ cc_prebuilt_library_static {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.a"],
|
srcs: ["x86_64/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
linux_glibc_x86: {
|
linux_glibc_x86: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86/lib/mynativelib.a"],
|
srcs: ["x86/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86/include_gen/mynativelib"],
|
export_include_dirs: ["x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1701,13 +1701,13 @@ module_exports_snapshot {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a
|
.intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_static/mynativelib.a -> x86/lib/mynativelib.a
|
.intermediates/mynativelib/linux_glibc_x86_static/mynativelib.a -> x86/lib/mynativelib.a
|
||||||
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86/include_gen/mynativelib/linux_glibc_x86_static/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1866,7 +1866,7 @@ cc_prebuilt_library_static {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.a"],
|
srcs: ["x86_64/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1892,7 +1892,7 @@ cc_prebuilt_library_static {
|
||||||
linux_glibc_x86_64: {
|
linux_glibc_x86_64: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
srcs: ["x86_64/lib/mynativelib.a"],
|
srcs: ["x86_64/lib/mynativelib.a"],
|
||||||
export_include_dirs: ["x86_64/include_gen/mynativelib"],
|
export_include_dirs: ["x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -1917,9 +1917,9 @@ module_exports_snapshot {
|
||||||
checkAllCopyRules(`
|
checkAllCopyRules(`
|
||||||
myinclude/Test.h -> include/myinclude/Test.h
|
myinclude/Test.h -> include/myinclude/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a
|
.intermediates/mynativelib/linux_glibc_x86_64_static/mynativelib.a -> x86_64/lib/mynativelib.a
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/Test.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/Test.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BnTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BnTest.h
|
||||||
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/aidl/foo/bar/BpTest.h
|
.intermediates/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h -> x86_64/include_gen/mynativelib/linux_glibc_x86_64_static/gen/aidl/aidl/foo/bar/BpTest.h
|
||||||
`),
|
`),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -204,7 +204,11 @@ func (h *TestHelper) AssertErrorMessageEquals(message string, expected string, a
|
||||||
|
|
||||||
func (h *TestHelper) AssertTrimmedStringEquals(message string, expected string, actual string) {
|
func (h *TestHelper) AssertTrimmedStringEquals(message string, expected string, actual string) {
|
||||||
h.t.Helper()
|
h.t.Helper()
|
||||||
h.AssertStringEquals(message, strings.TrimSpace(expected), strings.TrimSpace(actual))
|
expected = strings.TrimSpace(expected)
|
||||||
|
actual = strings.TrimSpace(actual)
|
||||||
|
if actual != expected {
|
||||||
|
h.t.Errorf("%s: expected:\n%s\nactual:\n%s\n", message, expected, actual)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *TestHelper) AssertDeepEquals(message string, expected interface{}, actual interface{}) {
|
func (h *TestHelper) AssertDeepEquals(message string, expected interface{}, actual interface{}) {
|
||||||
|
|
Loading…
Reference in New Issue