Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88152dd3 authored by Xin Li's avatar Xin Li
Browse files

DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master

Bug: 134405016
Change-Id: I6154b5b1dc252979cb0f05c8bfafe15fcdd63569
parents 7a22534a 218964e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ func getApiLevelsMap(config Config) map[string]int {
			"O":     26,
			"O-MR1": 27,
			"P":     28,
			"Q":     29,
		}
		for i, codename := range config.PlatformVersionCombinedCodenames() {
			apiLevelsMap[codename] = baseApiLevel + i
+10 −1
Original line number Diff line number Diff line
@@ -51,6 +51,7 @@ func createNeverAllows() []*rule {
	rules := []*rule{}
	rules = append(rules, createTrebleRules()...)
	rules = append(rules, createLibcoreRules()...)
	rules = append(rules, createMediaRules()...)
	rules = append(rules, createJavaDeviceForHostRules()...)
	return rules
}
@@ -70,7 +71,7 @@ func createTrebleRules() []*rule {

		// TODO(b/67974785): always enforce the manifest
		neverallow().
			without("name", "libhidltransport").
			without("name", "libhidltransport-impl-internal").
			with("product_variables.enforce_vintf_manifest.cflags", "*").
			because("manifest enforcement should be independent of ."),

@@ -111,6 +112,14 @@ func createLibcoreRules() []*rule {
	return rules
}

func createMediaRules() []*rule {
	return []*rule{
		neverallow().
			with("libs", "updatable-media").
			because("updatable-media includes private APIs. Use updatable_media_stubs instead."),
	}
}

func createJavaDeviceForHostRules() []*rule {
	javaDeviceForHostProjectsWhitelist := []string{
		"external/guava",
+11 −15
Original line number Diff line number Diff line
@@ -89,21 +89,6 @@ var neverallowTests = []struct {
		},
		expectedError: "manifest enforcement should be independent",
	},
	{
		name: "libhidltransport enforce_vintf_manifest.cflags",
		fs: map[string][]byte{
			"Blueprints": []byte(`
				cc_library {
					name: "libhidltransport",
					product_variables: {
						enforce_vintf_manifest: {
							cflags: ["-DSHOULD_NOT_EXIST"],
						},
					},
				}`),
		},
		expectedError: "",
	},

	{
		name: "no treble_linker_namespaces.cflags",
@@ -135,6 +120,17 @@ var neverallowTests = []struct {
		},
		expectedError: "",
	},
	{
		name: "dependency on updatable-media",
		fs: map[string][]byte{
			"Blueprints": []byte(`
				java_library {
					name: "needs_updatable_media",
					libs: ["updatable-media"],
				}`),
		},
		expectedError: "updatable-media includes private APIs. Use updatable_media_stubs instead.",
	},
	{
		name: "java_device_for_host",
		fs: map[string][]byte{
+5 −9
Original line number Diff line number Diff line
@@ -101,9 +101,8 @@ func init() {
		// not emit the table by default on Android since NDK still uses GNU binutils.
		"-faddrsig",

		// Make implicit fallthrough an error in the future.
		// -Wimplicit-fallthrough is not enabled by -Wall.
		"-Wimplicit-fallthrough",
		"-Wno-error=implicit-fallthrough",

		// Help catch common 32/64-bit errors.
		"-Werror=int-conversion",
@@ -171,11 +170,6 @@ func init() {
		"-Wno-tautological-unsigned-enum-zero-compare",
		"-Wno-tautological-unsigned-zero-compare",

		// http://b/72330874 Disable -Wenum-compare until the instances detected by this new
		// warning are fixed.
		"-Wno-enum-compare",
		"-Wno-enum-compare-switch",

		// Disable c++98-specific warning since Android is not concerned with C++98
		// compatibility.
		"-Wno-c++98-compat-extra-semi",
@@ -184,9 +178,11 @@ func init() {
		"-Wno-return-std-move-in-c++11",
	}, " "))

	// Extra cflags for projects under external/ directory
	// Extra cflags for projects under external/ directory to disable warnings that are infeasible
	// to fix in all the external projects and their upstream repos.
	pctx.StaticVariable("ClangExtraExternalCflags", strings.Join([]string{
		// TODO(yikong): Move -Wno flags here
		"-Wno-enum-compare",
		"-Wno-enum-compare-switch",

		// http://b/72331524 Allow null pointer arithmetic until the instances detected by
		// this new warning are fixed.
+2 −1
Original line number Diff line number Diff line
@@ -58,7 +58,8 @@ var (

	minimalRuntimeFlags = []string{"-fsanitize-minimal-runtime", "-fno-sanitize-trap=integer,undefined",
		"-fno-sanitize-recover=integer,undefined"}
	hwasanGlobalOptions = []string{"heap_history_size=1023,stack_history_size=512"}
	hwasanGlobalOptions = []string{"heap_history_size=1023", "stack_history_size=512",
		"export_memory_stats=0", "max_malloc_fill_size=0"}
)

type sanitizerType int
Loading