universal7885: Add extra compiler defaults

This commit is contained in:
roynatech2544 2022-05-20 13:05:35 +00:00
commit 5394c3b11f
11 changed files with 81 additions and 1 deletions

71
Android.bp Normal file
View file

@ -0,0 +1,71 @@
// From system/apex/apexd/Android.bp
tidy_errors = [
"android-*",
"bugprone-infinite-loop",
"bugprone-macro-parentheses",
"bugprone-misplaced-widening-cast",
"bugprone-move-forwarding-reference",
"bugprone-sizeof-container",
"bugprone-sizeof-expression",
"bugprone-string-constructor",
"bugprone-terminating-continue",
"bugprone-undefined-memory-manipulation",
"bugprone-undelegated-constructor",
"bugprone-unhandled-self-assignment",
"bugprone-unused-raii",
"cert-err34-c",
"google-default-arguments",
"google-explicit-constructor",
"google-readability-avoid-underscore-in-googletest-name",
"google-readability-todo",
"google-runtime-int",
"google-runtime-member-string-references",
"misc-move-const-arg",
"misc-move-forwarding-reference",
"misc-unused-parameters",
"misc-unused-using-decls",
"misc-use-after-move",
"modernize-pass-by-value",
"performance-faster-string-find",
"performance-for-range-copy",
"performance-implicit-conversion-in-loop",
"performance-inefficient-vector-operation",
"performance-move-const-arg",
"performance-move-constructor-init",
"performance-noexcept-move-constructor",
"performance-unnecessary-copy-initialization",
"performance-unnecessary-value-param",
"readability-avoid-const-params-in-decls",
]
cc_defaults {
name: "eureka_defaults",
cflags: [
"-Wall",
"-Wextra",
"-Werror",
"-Wno-unused-parameter",
// Some extra flags.
"-fstrict-aliasing",
"-Wredundant-decls",
"-Wshadow",
"-Wstrict-aliasing",
"-Wthread-safety",
"-Wthread-safety-negative",
"-Wunreachable-code",
"-Wunreachable-code-break",
"-Wunreachable-code-return",
"-Wunused",
"-Wused-but-marked-unused",
],
tidy: true,
tidy_checks: tidy_errors,
tidy_checks_as_errors: tidy_errors,
tidy_flags: [
"-format-style=file",
],
}

View file

@ -2,6 +2,7 @@ cc_binary {
name: "android.hardware.sensors@1.0-service.a10",
relative_install_path: "hw",
vendor: true,
defaults: ["eureka_defaults"],
init_rc: ["android.hardware.sensors@1.0-service.a10.rc"],
srcs: ["service.cpp"],
compile_multilib: "32",

View file

@ -18,6 +18,7 @@ cc_binary {
relative_install_path: "hw",
init_rc: ["android.hardware.usb@1.0-service.a10.rc"],
vintf_fragments: ["android.hardware.usb@1.0-service.a10.xml"],
defaults: ["eureka_defaults"],
srcs: [
"service.cpp",
"Usb.cpp",

View file

@ -7,6 +7,7 @@ cc_library_shared {
"fm_ioctl.cpp",
"fm_route.cpp",
],
defaults: ["eureka_defaults"],
shared_libs: [
"libhidlbase",
"liblog",

View file

@ -1,5 +1,6 @@
cc_library_shared {
name: "libsamsungparts_jni",
defaults: ["eureka_defaults"],
cflags: [
"-Wall",
"-Wextra",

View file

@ -17,6 +17,7 @@ cc_binary {
name: "android.hardware.camera.provider@2.5-service.exynos7885",
defaults: [
"hidl_defaults",
"eureka_defaults",
],
proprietary: true,
relative_install_path: "hw",

View file

@ -19,5 +19,6 @@ cc_binary {
srcs: [
"Logger.cpp",
],
defaults: ["eureka_defaults"],
init_rc: ["eklogger.rc"],
}

View file

@ -5,7 +5,7 @@ cc_library_shared {
proprietary: true,
recovery_available: true,
relative_install_path: "hw",
defaults: ["eureka_defaults"],
shared_libs: [
"libbase",
"libcutils",

View file

@ -6,6 +6,7 @@ cc_binary {
"FMRadio.cpp",
"service.cpp",
],
defaults: ["eureka_defaults"],
shared_libs: [
"libhidlbase",
"libutils",

View file

@ -2,6 +2,7 @@
cc_binary {
name: "vendor.eureka.hardware.parts@1.0-service",
defaults: ["eureka_defaults"],
srcs: [
"Battery.cpp",
"FlashLight.cpp",

View file

@ -15,6 +15,7 @@
cc_library_static {
name: "libinit_universal7885",
recovery_available: true,
defaults: ["eureka_defaults"],
whole_static_libs: ["libbase"],
header_libs: ["libbase_headers"],
srcs: ["init_universal7885.cpp"],