diff --git a/portage/env/chromium.conf b/portage/env/chromium.conf index 925fb78..8ea2276 100644 --- a/portage/env/chromium.conf +++ b/portage/env/chromium.conf @@ -1,10 +1,10 @@ -## Compiler flags. -CFLAGS="-march=znver3 -O2 -pipe -U__gnu_linux__" -CXXFLAGS="-march=znver3 -O2 -pipe" +## Hardening flags. +LD_SEC="-Wl,-pie -Wl,--strip-all -Wl,-z,defs -Wl,-z,now -Wl,-z,relro -L/usr/local/lib -lhardened_malloc" ## Linker flags. -LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind" +LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,--thinlto-jobs=4 ${LD_SEC}" ## GN flags. EXTRA_GN="target_os=\"linux\" target_cpu=\"x64\" is_official_build=true use_cfi_cast=true is_component_build=false is_debug=false ffmpeg_branding=\"Chrome\" proprietary_codecs=true enable_widevine=true symbol_level=0 blink_symbol_level=0 enable_resource_allowlist_generation=false enable_remoting=false enable_nacl=false disable_fieldtrial_testing_config=true" + CHROMIUM_FORCE_LIBCXX=yes