From cac340ffa66d3e5bfbe43684f4ce8b3a51893b75 Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Thu, 9 Feb 2023 16:11:34 +0900 Subject: [PATCH 1/2] gn2bp: Pass additional cflags to reduce cronet library size Bug: 265913942 Test: ./update_results.sh Change-Id: Ib802862d1ccab4b8cc2906a0f08aa2d3bddef9e2 --- tools/gn2bp/Android.bp.swp | 1601 ++++++++++++++++++++++++++++++++++++ tools/gn2bp/gen_android_bp | 14 + 2 files changed, 1615 insertions(+) diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp index 0a18a7f204..f20760bb8d 100644 --- a/tools/gn2bp/Android.bp.swp +++ b/tools/gn2bp/Android.bp.swp @@ -272,6 +272,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-O3", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -294,13 +300,19 @@ cc_library_static { srcs: [ "base/allocator/partition_allocator/starscan/stack/asm/arm/push_registers_asm.cc", ], + cflags: [ + "-fstack-protector", + ], }, android_arm64: { srcs: [ "base/allocator/partition_allocator/starscan/stack/asm/arm64/push_registers_asm.cc", ], cflags: [ + "-fstack-protector", "-march=armv8-a+memtag", + "-mno-outline", + "-mno-outline-atomics", ], }, android_x86: { @@ -316,6 +328,7 @@ cc_library_static { "base/allocator/partition_allocator/starscan/stack/asm/x64/push_registers_asm.cc", ], cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -991,6 +1004,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -1021,11 +1040,19 @@ cc_library_static { "base/profiler/chrome_unwinder_android_v2.cc", "base/trace_event/cfi_backtrace_android.cc", ], + cflags: [ + "-fstack-protector", + ], }, android_arm64: { srcs: [ "base/android/reached_code_profiler.cc", ], + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], }, android_x86: { srcs: [ @@ -1040,6 +1067,7 @@ cc_library_static { "base/android/reached_code_profiler_stub.cc", ], cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -1384,6 +1412,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -1398,6 +1432,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -1405,6 +1451,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -1708,6 +1755,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -1717,6 +1770,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -1724,6 +1789,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -1939,6 +2005,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -1953,6 +2025,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -1960,6 +2044,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -1988,6 +2073,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -2002,6 +2093,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -2009,6 +2112,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -2255,6 +2359,10 @@ cc_object { "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCPP_OVERRIDABLE_FUNC_VIS=__attribute__((__visibility__(\"default\")))", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", ], local_include_dirs: [ "./", @@ -2274,6 +2382,9 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", ], }, android_arm64: { @@ -2281,6 +2392,11 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", + "-mno-outline", + "-mno-outline-atomics", ], }, android_x86: { @@ -2288,6 +2404,8 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-g1", "-msse3", ], }, @@ -2296,6 +2414,9 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", "-msse3", ], }, @@ -2309,6 +2430,9 @@ cc_object { "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE64_SOURCE", "-D_LARGEFILE_SOURCE", + "-O2", + "-fstack-protector", + "-g2", "-msse3", ], }, @@ -2353,6 +2477,10 @@ cc_object { "-D_LIBCPP_CONSTINIT=constinit", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", ], local_include_dirs: [ "./", @@ -2375,6 +2503,9 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", ], }, android_arm64: { @@ -2385,6 +2516,11 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", + "-mno-outline", + "-mno-outline-atomics", ], }, android_x86: { @@ -2395,6 +2531,8 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-g1", "-msse3", ], }, @@ -2406,6 +2544,9 @@ cc_object { "-DANDROID", "-DANDROID_NDK_VERSION_ROLL=r23_1", "-DHAVE_SYS_UIO_H", + "-Oz", + "-fstack-protector", + "-g1", "-msse3", ], }, @@ -2422,6 +2563,9 @@ cc_object { "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE64_SOURCE", "-D_LARGEFILE_SOURCE", + "-O2", + "-fstack-protector", + "-g2", "-msse3", ], }, @@ -2537,6 +2681,12 @@ cc_library_shared { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -2559,6 +2709,18 @@ cc_library_shared { ], stem: "libcronet.108.0.5359.128", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -2566,6 +2728,7 @@ cc_library_shared { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3206,6 +3369,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -3221,6 +3390,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -3228,6 +3409,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3572,6 +3754,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -3587,6 +3775,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -3594,6 +3794,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3667,6 +3868,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -3678,6 +3885,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -3685,6 +3904,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3743,6 +3963,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -3755,6 +3981,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -3762,6 +4000,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3876,6 +4115,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -3892,6 +4137,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -3899,6 +4156,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -3994,6 +4252,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -4010,6 +4274,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -4017,6 +4293,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -4650,6 +4927,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -4666,6 +4949,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -4673,6 +4968,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -4754,6 +5050,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -4770,6 +5072,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -4777,6 +5091,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -4871,6 +5186,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -4887,6 +5208,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -4894,6 +5227,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -5539,6 +5873,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -5564,11 +5904,19 @@ cc_library_static { srcs: [ "net/disk_cache/blockfile/mapped_file_bypass_mmap_posix.cc", ], + cflags: [ + "-fstack-protector", + ], }, android_arm64: { srcs: [ "net/disk_cache/blockfile/mapped_file_bypass_mmap_posix.cc", ], + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], }, android_x86: { srcs: [ @@ -5583,6 +5931,7 @@ cc_library_static { "net/disk_cache/blockfile/mapped_file_bypass_mmap_posix.cc", ], cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -5651,6 +6000,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -5664,6 +6019,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -5671,6 +6038,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -5883,6 +6251,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -5898,6 +6272,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -5905,6 +6291,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -5952,6 +6339,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -5968,6 +6361,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -5975,6 +6380,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6457,6 +6863,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6477,6 +6889,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6484,6 +6908,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6534,6 +6959,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6545,6 +6976,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6552,6 +6995,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6600,6 +7044,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6616,6 +7066,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6623,6 +7085,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6656,6 +7119,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6666,6 +7135,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6673,6 +7154,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6702,6 +7184,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6712,6 +7200,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6719,6 +7219,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6748,6 +7249,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6758,6 +7265,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6765,6 +7284,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6794,6 +7314,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6804,6 +7330,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6811,6 +7349,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6840,6 +7379,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6850,6 +7395,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6857,6 +7414,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6886,6 +7444,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6896,6 +7460,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6903,6 +7479,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6932,6 +7509,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6942,6 +7525,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6949,6 +7544,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -6979,6 +7575,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -6989,6 +7591,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -6996,6 +7610,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7025,6 +7640,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7035,6 +7656,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7042,6 +7675,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7073,6 +7707,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7083,6 +7723,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7090,6 +7742,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7119,6 +7772,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7129,6 +7788,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7136,6 +7807,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7165,6 +7837,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7175,6 +7853,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7182,6 +7872,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7211,6 +7902,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7221,6 +7918,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7228,6 +7937,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7257,6 +7967,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7267,6 +7983,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7274,6 +8002,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7303,6 +8032,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7313,6 +8048,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7320,6 +8067,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7349,6 +8097,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7359,6 +8113,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7366,6 +8132,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7395,6 +8162,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7405,6 +8178,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7412,6 +8197,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7441,6 +8227,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7451,6 +8243,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7458,6 +8262,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7487,6 +8292,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7497,6 +8308,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7504,6 +8327,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7533,6 +8357,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7543,6 +8373,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7550,6 +8392,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7580,6 +8423,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7590,6 +8439,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7597,6 +8458,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7629,6 +8491,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7639,6 +8507,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7646,6 +8526,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7678,6 +8559,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7688,6 +8575,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7695,6 +8594,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7727,6 +8627,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7737,6 +8643,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7744,6 +8662,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7776,6 +8695,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7786,6 +8711,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7793,6 +8730,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7825,6 +8763,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7835,6 +8779,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7842,6 +8798,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7874,6 +8831,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7884,6 +8847,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7891,6 +8866,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7920,6 +8896,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7930,6 +8912,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7937,6 +8931,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -7966,6 +8961,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -7976,6 +8977,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -7983,6 +8996,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8015,6 +9029,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8025,6 +9045,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8032,6 +9064,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8062,6 +9095,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8072,6 +9111,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8079,6 +9130,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8108,6 +9160,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8118,6 +9176,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8125,6 +9195,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8156,6 +9227,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8166,6 +9243,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8173,6 +9262,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8208,6 +9298,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8218,6 +9314,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8225,6 +9333,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8254,6 +9363,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8264,6 +9379,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8271,6 +9398,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8300,6 +9428,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8310,6 +9444,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8317,6 +9463,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8346,6 +9493,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8356,6 +9509,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8363,6 +9528,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8394,6 +9560,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8404,6 +9576,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8411,6 +9595,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8445,6 +9630,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8455,6 +9646,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8462,6 +9665,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8503,6 +9707,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8513,6 +9723,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8520,6 +9742,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8549,6 +9772,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8559,6 +9788,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8566,6 +9807,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8601,6 +9843,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8611,6 +9859,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8618,6 +9878,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8647,6 +9908,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8657,6 +9924,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8664,6 +9943,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8701,6 +9981,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8711,6 +9997,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8718,6 +10016,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8751,6 +10050,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8761,6 +10066,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8768,6 +10085,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8797,6 +10115,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8807,6 +10131,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8814,6 +10150,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8843,6 +10180,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8853,6 +10196,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8860,6 +10215,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8888,6 +10244,12 @@ cc_object { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8898,6 +10260,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8905,6 +10279,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -8936,6 +10311,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -8945,6 +10326,18 @@ cc_object { ], cpp_std: "c++17", target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -8952,6 +10345,7 @@ cc_object { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -9250,6 +10644,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -9265,6 +10665,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -9272,6 +10684,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -9300,6 +10713,12 @@ cc_object { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -9326,6 +10745,9 @@ cc_object { "third_party/boringssl/src/crypto/curve25519/asm/x25519-asm-arm.S", "third_party/boringssl/src/crypto/poly1305/poly1305_arm_asm.S", ], + cflags: [ + "-fstack-protector", + ], }, android_arm64: { srcs: [ @@ -9343,6 +10765,11 @@ cc_object { "third_party/boringssl/linux-aarch64/crypto/fipsmodule/vpaes-armv8.S", "third_party/boringssl/linux-aarch64/crypto/test/trampoline-armv8.S", ], + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], }, android_x86: { srcs: [ @@ -9388,6 +10815,7 @@ cc_object { "third_party/boringssl/src/crypto/hrss/asm/poly_rq_mul.S", ], cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -9424,6 +10852,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -9439,6 +10873,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -9446,6 +10892,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -9480,6 +10927,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -9495,6 +10948,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -9502,6 +10967,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -9784,6 +11250,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -9801,6 +11273,18 @@ cc_library_static { ], rtti: true, target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -9808,6 +11292,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -10047,6 +11532,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -10064,6 +11555,18 @@ cc_library_static { ], rtti: true, target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -10071,6 +11574,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -10113,6 +11617,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -10128,6 +11638,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -10135,6 +11657,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -10311,6 +11834,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -10325,6 +11854,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -10332,6 +11873,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -10458,6 +12000,13 @@ cc_library_static { "-D_LARGEFILE_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fstack-protector", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g2", "-msse3", ], local_include_dirs: [ @@ -10535,6 +12084,12 @@ cc_library_static { "-D_GNU_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -10550,6 +12105,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -10557,6 +12124,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, @@ -10605,6 +12173,13 @@ cc_binary { "-D_LARGEFILE_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fstack-protector", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g2", "-msse3", ], local_include_dirs: [ @@ -10745,6 +12320,13 @@ cc_library_static { "-D_LARGEFILE_SOURCE", "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", + "-O2", + "-fdata-sections", + "-ffunction-sections", + "-fstack-protector", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g2", "-msse3", ], local_include_dirs: [ @@ -10862,6 +12444,12 @@ cc_library_static { "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", "-D__STDC_CONSTANT_MACROS", "-D__STDC_FORMAT_MACROS", + "-Oz", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility-inlines-hidden", + "-fvisibility=hidden", + "-g1", ], local_include_dirs: [ "./", @@ -10878,6 +12466,18 @@ cc_library_static { "-Wl,--icf=all", ], target: { + android_arm: { + cflags: [ + "-fstack-protector", + ], + }, + android_arm64: { + cflags: [ + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics", + ], + }, android_x86: { cflags: [ "-msse3", @@ -10885,6 +12485,7 @@ cc_library_static { }, android_x86_64: { cflags: [ + "-fstack-protector", "-msse3", ], }, diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp index 79860febce..94b96e6e72 100755 --- a/tools/gn2bp/gen_android_bp +++ b/tools/gn2bp/gen_android_bp @@ -126,6 +126,20 @@ cflag_allowlist = [ "-msse3", # needed for zlib:zlib "-msse4.2", + # flags to reduce binary size + "-O1", + "-O2", + "-O3", + "-Oz", + "-g1", + "-g2", + "-fdata-sections", + "-ffunction-sections", + "-fvisibility=hidden", + "-fvisibility-inlines-hidden", + "-fstack-protector", + "-mno-outline", + "-mno-outline-atomics" ] # Linker flags which are passed through to the blueprint. From d87f3191ec70bfb9d35917c6e363f2e85005393f Mon Sep 17 00:00:00 2001 From: Motomu Utsumi Date: Thu, 9 Feb 2023 17:34:09 +0900 Subject: [PATCH 2/2] gn2bp: Remove duplicated cflags from default.cflags They are in cflag_allowlist so don't need to be in default Bug: 265913942 Test: ./update_resutls.sh Change-Id: Ia3ed3c1f2d1c784832d01405706eb2f30db725a9 --- tools/gn2bp/Android.bp.swp | 2 -- tools/gn2bp/gen_android_bp | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/gn2bp/Android.bp.swp b/tools/gn2bp/Android.bp.swp index f20760bb8d..d559a333b9 100644 --- a/tools/gn2bp/Android.bp.swp +++ b/tools/gn2bp/Android.bp.swp @@ -4305,7 +4305,6 @@ cc_defaults { name: "cronet_aml_defaults", cflags: [ "-DGOOGLE_PROTOBUF_NO_RTTI", - "-O2", "-Wno-ambiguous-reversed-operator", "-Wno-error=return-type", "-Wno-macro-redefined", @@ -4317,7 +4316,6 @@ cc_defaults { "-Wno-unreachable-code-loop-increment", "-Wno-unused-parameter", "-fPIC", - "-fvisibility=hidden", ], stl: "none", apex_available: [ diff --git a/tools/gn2bp/gen_android_bp b/tools/gn2bp/gen_android_bp index 94b96e6e72..9dc5cdbfb9 100755 --- a/tools/gn2bp/gen_android_bp +++ b/tools/gn2bp/gen_android_bp @@ -1634,10 +1634,8 @@ def create_blueprint_for_targets(gn, targets): '-Wno-sign-promo', '-Wno-unused-parameter', '-Wno-null-pointer-subtraction', # Needed to libevent - '-fvisibility=hidden', '-Wno-ambiguous-reversed-operator', # needed for icui18n '-Wno-unreachable-code-loop-increment', # needed for icui18n - '-O2', '-fPIC', ] # Chromium builds do not add a dependency for headers found inside the