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", name: "android.hardware.sensors@1.0-service.a10",
relative_install_path: "hw", relative_install_path: "hw",
vendor: true, vendor: true,
defaults: ["eureka_defaults"],
init_rc: ["android.hardware.sensors@1.0-service.a10.rc"], init_rc: ["android.hardware.sensors@1.0-service.a10.rc"],
srcs: ["service.cpp"], srcs: ["service.cpp"],
compile_multilib: "32", compile_multilib: "32",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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