mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-09 11:27:32 -03:00
remove //other BUILD.gns, and update ALL args.gns to use new SIMD flags.
Also remove args that have been commented for months/years and move them to a new file in //infra
This commit is contained in:
parent
60cd5f2570
commit
15c1ca4ea9
44 changed files with 441 additions and 21148 deletions
21
args.gn
21
args.gn
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -29,7 +29,6 @@ thin_lto_enable_cache = false
|
|||
strip_debug_info = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -58,7 +57,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -68,14 +66,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
enable_cdm_host_verification = false
|
||||
# enable_widevine_cdm_component = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
@ -87,7 +81,6 @@ rtc_build_with_neon = true
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -29,7 +29,6 @@ thin_lto_enable_cache = false
|
|||
strip_debug_info = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -58,7 +57,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -68,14 +66,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
enable_cdm_host_verification = false
|
||||
# enable_widevine_cdm_component = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
@ -87,7 +81,6 @@ rtc_build_with_neon = true
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
enable_jxl_decoder = true
|
||||
target_os = "android"
|
||||
target_cpu = "x64"
|
||||
|
@ -21,7 +29,6 @@ thin_lto_enable_cache = false
|
|||
strip_debug_info = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -49,7 +56,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -59,17 +65,12 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
enable_cdm_host_verification = false
|
||||
# enable_widevine_cdm_component = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = true
|
||||
rtc_use_h264 = false
|
||||
rtc_prefer_fixed_point = true
|
||||
|
@ -78,7 +79,6 @@ rtc_build_with_neon = false
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
enable_jxl_decoder = true
|
||||
target_os = "android"
|
||||
target_cpu = "x86"
|
||||
|
@ -21,7 +29,6 @@ thin_lto_enable_cache = false
|
|||
strip_debug_info = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -49,7 +56,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -59,17 +65,12 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
enable_cdm_host_verification = false
|
||||
# enable_widevine_cdm_component = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = true
|
||||
rtc_use_h264 = false
|
||||
rtc_prefer_fixed_point = true
|
||||
|
@ -78,7 +79,6 @@ rtc_build_with_neon = false
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -25,7 +25,6 @@ thin_lto_enable_cache = true
|
|||
strip_debug_info = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -52,7 +51,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
# enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -62,14 +60,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
enable_cdm_host_verification = false
|
||||
# enable_widevine_cdm_component = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
|
@ -81,7 +75,6 @@ rtc_build_with_neon = false
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -23,7 +23,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -51,7 +50,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -61,15 +59,11 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
|
@ -81,7 +75,6 @@ rtc_include_ilbc = true
|
|||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
# use_polly = true
|
||||
target_os = "win"
|
||||
is_win_arm64 = true
|
||||
|
@ -12,7 +9,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -39,7 +35,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -50,14 +45,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -74,7 +65,6 @@ rtc_include_ilbc = true
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
|
@ -12,7 +17,6 @@ enable_stripping = false
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = true
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -41,7 +45,6 @@ blink_symbol_level = 2
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -52,27 +55,20 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = false
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = true
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
is_official_build = false
|
||||
|
@ -6,7 +14,6 @@ enable_stripping = false
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -34,7 +41,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
proprietary_codecs = true
|
||||
ffmpeg_branding = "Chrome"
|
||||
|
@ -42,27 +48,20 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = false
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = true
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = false
|
||||
|
@ -6,7 +14,6 @@ enable_stripping = false
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = true
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -35,7 +42,6 @@ blink_symbol_level = 1
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -46,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = false
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -61,15 +63,12 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = false
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = false
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = true
|
||||
exclude_unwind_tables = false
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -39,7 +44,6 @@ blink_symbol_level = 2
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -50,14 +54,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = false
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -65,15 +65,12 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
27
infra/REMOVED_ARGS.txt
Normal file
27
infra/REMOVED_ARGS.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
## List of arguments that were commented out from any of the args.gn files
|
||||
|
||||
### Kept for posterity
|
||||
|
||||
is_chancie_wancie_build = true # Was used to build ChromiumOS FFMPEG on Linux
|
||||
|
||||
clang_base_path = "/usr/lib/llvm-18" # Not needed anymore
|
||||
|
||||
clang_version = "18" # Not needed anymore
|
||||
|
||||
enable_debugallocation = false # Removed upstream
|
||||
|
||||
enable_hls_sample_aes = true # Removed upstream
|
||||
|
||||
use_webaudio_ffmpeg = false # Removed upstream
|
||||
|
||||
enable_av1_decoder = true # Removed upstream
|
||||
|
||||
enable_dav1d_decoder = true # Not needed anymore
|
||||
|
||||
enable_media_overlay = true # Removed upstream
|
||||
|
||||
use_vr_assets_component = true # Removed upstream
|
||||
|
||||
enable_widevine_cdm_component = true # Set internally
|
||||
|
||||
visual_studio_version = "2022" # Not needed anymore
|
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = true
|
||||
use_avx512 = false
|
||||
use_fma = true
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,702 +0,0 @@
|
|||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/c++/c++.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/rust.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/win/control_flow_guard.gni")
|
||||
import("//build/config/win/visual_studio_version.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
assert(is_win)
|
||||
|
||||
declare_args() {
|
||||
# Turn this on to have the linker output extra timing information.
|
||||
win_linker_timing = false
|
||||
|
||||
# possible values for target_winuwp_version:
|
||||
# "10" - Windows UWP 10
|
||||
# "8.1" - Windows RT 8.1
|
||||
# "8.0" - Windows RT 8.0
|
||||
target_winuwp_version = "10"
|
||||
|
||||
# possible values:
|
||||
# "app" - Windows Store Applications
|
||||
# "phone" - Windows Phone Applications
|
||||
# "system" - Windows Drivers and Tools
|
||||
# "server" - Windows Server Applications
|
||||
# "desktop" - Windows Desktop Applications
|
||||
target_winuwp_family = "app"
|
||||
|
||||
# Set this to use clang-style diagnostics format instead of MSVC-style, which
|
||||
# is useful in e.g. Emacs compilation mode.
|
||||
# E.g.:
|
||||
# Without this, clang emits a diagnostic message like this:
|
||||
# foo/bar.cc(12,34): error: something went wrong
|
||||
# and with this switch, clang emits it like this:
|
||||
# foo/bar.cc:12:34: error: something went wrong
|
||||
use_clang_diagnostics_format = false
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler config that
|
||||
# is applied to all targets. It is here to separate out the logic that is
|
||||
# Windows-only.
|
||||
config("compiler") {
|
||||
if (current_cpu == "x86") {
|
||||
asmflags = [
|
||||
# When /safeseh is specified, the linker will only produce an image if it
|
||||
# can also produce a table of the image's safe exception handlers. This
|
||||
# table specifies for the operating system which exception handlers are
|
||||
# valid for the image. Note that /SAFESEH isn't accepted on the command
|
||||
# line, only /safeseh. This is only accepted by ml.exe, not ml64.exe.
|
||||
"/safeseh",
|
||||
]
|
||||
}
|
||||
|
||||
cflags = [
|
||||
"/Gy", # Enable function-level linking.
|
||||
"/FS", # Preserve previous PDB behavior.
|
||||
"/bigobj", # Some of our files are bigger than the regular limits.
|
||||
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"/Zc:twoPhase",
|
||||
|
||||
# Consistently use backslash as the path separator when expanding the
|
||||
# __FILE__ macro when targeting Windows regardless of the build
|
||||
# environment.
|
||||
"-ffile-reproducible",
|
||||
]
|
||||
}
|
||||
|
||||
# Force C/C++ mode for the given GN detected file type. This is necessary
|
||||
# for precompiled headers where the same source file is compiled in both
|
||||
# modes.
|
||||
cflags_c = [ "/TC" ]
|
||||
cflags_cc = [ "/TP" ]
|
||||
|
||||
cflags += [
|
||||
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
|
||||
# "/Zc:sizedDealloc-",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Required to make the 19041 SDK compatible with clang-cl.
|
||||
# See https://crbug.com/1089996 issue #2 for details.
|
||||
cflags += [ "/D__WRL_ENABLE_FUNCTION_STATICS__" ]
|
||||
|
||||
# Tell clang which version of MSVC to emulate.
|
||||
cflags += [ "-fmsc-version=1934" ]
|
||||
|
||||
if (is_component_build) {
|
||||
cflags += [
|
||||
# Do not export inline member functions. This makes component builds
|
||||
# faster. This is similar to -fvisibility-inlines-hidden.
|
||||
"/Zc:dllexportInlines-",
|
||||
]
|
||||
}
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m32" ]
|
||||
} else {
|
||||
cflags += [ "--target=i386-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "x64") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m64" ]
|
||||
} else {
|
||||
cflags += [ "--target=x86_64-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
cflags += [ "--target=aarch64-pc-windows" ]
|
||||
} else {
|
||||
assert(false, "unknown current_cpu " + current_cpu)
|
||||
}
|
||||
|
||||
# Chrome currently requires SSE3. Clang supports targeting any Intel
|
||||
# microarchitecture. MSVC only supports a subset of architectures, and the
|
||||
# next step after SSE2 will be AVX.
|
||||
# "/fp:fast", enables FMA.
|
||||
# "/arch:AVX2", for AVX2
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"-msse3",
|
||||
"-mssse3",
|
||||
"-msse4.1",
|
||||
"-msse4.2",
|
||||
"-mpclmul",
|
||||
"-maes",
|
||||
"-mavx",
|
||||
"-mavx2",
|
||||
"-mfma",
|
||||
"-mf16c",
|
||||
"-mlzcnt",
|
||||
"-mbmi2",
|
||||
"/clang:-O3",
|
||||
"/clang:-msse3",
|
||||
"/clang:-mssse3",
|
||||
"/clang:-msse4.1",
|
||||
"/clang:-msse4.2",
|
||||
"/clang:-mpclmul",
|
||||
"/clang:-maes",
|
||||
"/clang:-mavx",
|
||||
"/clang:-mavx2",
|
||||
"/clang:-mfma",
|
||||
"/clang:-mf16c",
|
||||
"/clang:-mlzcnt",
|
||||
"/clang:-mbmi2",
|
||||
"/clang:-ffp-contract=fast",
|
||||
"/clang:-w",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
}
|
||||
|
||||
# Enable ANSI escape codes if something emulating them is around (cmd.exe
|
||||
# doesn't understand ANSI escape codes by default). Make sure to not enable
|
||||
# this if remoteexec is in use, because this will lower cache hits.
|
||||
if (!use_remoteexec &&
|
||||
exec_script("//build/win/use_ansi_codes.py", [], "trim string") ==
|
||||
"True") {
|
||||
cflags += [ "-fansi-escape-codes" ]
|
||||
}
|
||||
|
||||
if (use_clang_diagnostics_format) {
|
||||
cflags += [ "/clang:-fdiagnostics-format=clang" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Disabled with cc_wrapper because of https://github.com/mozilla/sccache/issues/264
|
||||
if (use_lld && !use_thin_lto && cc_wrapper == "") {
|
||||
# /Brepro lets the compiler not write the mtime field in the .obj output.
|
||||
# link.exe /incremental relies on this field to work correctly, but lld
|
||||
# never looks at this timestamp, so it's safe to pass this flag with
|
||||
# lld and get more deterministic compiler output in return.
|
||||
# In LTO builds, the compiler doesn't write .obj files containing mtimes,
|
||||
# so /Brepro is ignored there.
|
||||
cflags += [ "/Brepro" ]
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
|
||||
if (use_lld) {
|
||||
# lld defaults to writing the current time in the pe/coff header.
|
||||
# For build reproducibility, pass an explicit timestamp. See
|
||||
# build/compute_build_timestamp.py for how the timestamp is chosen.
|
||||
# (link.exe also writes the current time, but it doesn't have a flag to
|
||||
# override that behavior.)
|
||||
ldflags += [ "/TIMESTAMP:" + build_timestamp ]
|
||||
|
||||
# Don't look for libpaths in %LIB%, similar to /X in cflags above.
|
||||
ldflags += [ "/lldignoreenv" ]
|
||||
ldflags += [ "/opt:lldlto=3", ]
|
||||
}
|
||||
|
||||
# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size
|
||||
# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps
|
||||
# which is a PDB limit that was hit in https://crbug.com/1406510. The page size
|
||||
# can easily be increased in the future to allow even larger PDBs or larger
|
||||
# block maps.
|
||||
# This flag requires lld-link.exe or link.exe from VS 2022 or later to create
|
||||
# the PDBs, and tools from circa 22H2 or later to consume the PDBs.
|
||||
# Debug component builds can generate PDBs that exceed 8 GiB, so use an
|
||||
# even larger page size, allowing up to 16 GiB PDBs.
|
||||
if (is_debug && !is_component_build) {
|
||||
ldflags += [ "/pdbpagesize:16384" ]
|
||||
} else {
|
||||
ldflags += [ "/pdbpagesize:8192" ]
|
||||
}
|
||||
|
||||
if (!is_debug && !is_component_build) {
|
||||
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
|
||||
# release builds.
|
||||
# Release builds always want these optimizations, so enable them explicitly.
|
||||
ldflags += [
|
||||
"/OPT:REF",
|
||||
"/OPT:ICF",
|
||||
"/INCREMENTAL:NO",
|
||||
"/FIXED:NO",
|
||||
"/OPT:lldlto=3",
|
||||
"-mllvm:-march=haswell",
|
||||
]
|
||||
|
||||
if (use_lld) {
|
||||
# String tail merging leads to smaller binaries, but they don't compress
|
||||
# as well, leading to increased mini_installer size (crbug.com/838449).
|
||||
# ldflags += [ "/OPT:NOLLDTAILMERGE" ]
|
||||
ldflags += [ "/OPT:LLDTAILMERGE" ]
|
||||
}
|
||||
|
||||
# TODO(siggi): Is this of any use anymore?
|
||||
# /PROFILE ensures that the PDB file contains FIXUP information (growing the
|
||||
# PDB file by about 5%) but does not otherwise alter the output binary. It
|
||||
# is enabled opportunistically for builds where it is not prohibited (not
|
||||
# supported when incrementally linking, or using /debug:fastlink).
|
||||
# ldflags += [ "/PROFILE" ]
|
||||
}
|
||||
|
||||
# arflags apply only to static_libraries. The normal linker configs are only
|
||||
# set for executable and shared library targets so arflags must be set
|
||||
# elsewhere. Since this is relatively contained, we just apply them in this
|
||||
# more general config and they will only have an effect on static libraries.
|
||||
arflags = [
|
||||
# "No public symbols found; archive member will be inaccessible." This
|
||||
# means that one or more object files in the library can never be
|
||||
# pulled in to targets that link to this library. It's just a warning that
|
||||
# the source file is a no-op.
|
||||
"/ignore:4221",
|
||||
]
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler:runtime_library
|
||||
# config that is applied to all targets. It is here to separate out the logic
|
||||
# that is Windows-only. Please see that target for advice on what should go in
|
||||
# :runtime_library vs. :compiler.
|
||||
config("runtime_library") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
|
||||
# Defines that set up the CRT.
|
||||
defines = [
|
||||
"__STD_C",
|
||||
"_CRT_RAND_S",
|
||||
"_CRT_SECURE_NO_DEPRECATE",
|
||||
"_SCL_SECURE_NO_DEPRECATE",
|
||||
]
|
||||
|
||||
# Defines that set up the Windows SDK.
|
||||
defines += [
|
||||
"_ATL_NO_OPENGL",
|
||||
"_WINDOWS",
|
||||
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
|
||||
"PSAPI_VERSION=2",
|
||||
"WIN32",
|
||||
"_SECURE_ATL",
|
||||
]
|
||||
|
||||
if (current_os == "winuwp") {
|
||||
# When targeting Windows Runtime, certain compiler/linker flags are
|
||||
# necessary.
|
||||
defines += [
|
||||
"WINUWP",
|
||||
"__WRL_NO_DEFAULT_LIB__",
|
||||
]
|
||||
if (target_winuwp_family == "app") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP" ]
|
||||
} else if (target_winuwp_family == "phone") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" ]
|
||||
} else if (target_winuwp_family == "system") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM" ]
|
||||
} else if (target_winuwp_family == "server") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SERVER" ]
|
||||
} else {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
cflags_cc += [ "/EHsc" ]
|
||||
|
||||
# This warning is given because the linker cannot tell the difference
|
||||
# between consuming WinRT APIs versus authoring WinRT within static
|
||||
# libraries as such this warning is always given by the linker. Since
|
||||
# consuming WinRT APIs within a library is legitimate but authoring
|
||||
# WinRT APis is not allowed, this warning is disabled to ignore the
|
||||
# legitimate consumption of WinRT APIs within static library builds.
|
||||
arflags = [ "/IGNORE:4264" ]
|
||||
|
||||
if (target_winuwp_version == "10") {
|
||||
defines += [ "WIN10=_WIN32_WINNT_WIN10" ]
|
||||
} else if (target_winuwp_version == "8.1") {
|
||||
defines += [ "WIN8_1=_WIN32_WINNT_WINBLUE" ]
|
||||
} else if (target_winuwp_version == "8.0") {
|
||||
defines += [ "WIN8=_WIN32_WINNT_WIN8" ]
|
||||
}
|
||||
} else {
|
||||
# When not targeting Windows Runtime, make sure the WINAPI family is set
|
||||
# to desktop.
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Chromium only supports Windowes 10+.
|
||||
# Some third-party libraries assume that these defines set what version of
|
||||
# Windows is available at runtime. Targets using these libraries need to
|
||||
# manually override this config for their compiles.
|
||||
config("winver") {
|
||||
defines = [
|
||||
"NTDDI_VERSION=NTDDI_WIN10_NI",
|
||||
|
||||
# We can't say `=_WIN32_WINNT_WIN10` here because some files do
|
||||
# `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
"WINVER=0x0A00",
|
||||
]
|
||||
}
|
||||
|
||||
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
|
||||
config("sdk_link") {
|
||||
if (current_cpu == "x86") {
|
||||
ldflags = [
|
||||
"/SAFESEH", # Not compatible with x64 so use only for x86.
|
||||
"/largeaddressaware",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This default linker setup is provided separately from the SDK setup so
|
||||
# targets who want different library configurations can remove this and specify
|
||||
# their own.
|
||||
config("common_linker_setup") {
|
||||
ldflags = [
|
||||
"/FIXED:NO",
|
||||
"/ignore:4199",
|
||||
"/ignore:4221",
|
||||
"/NXCOMPAT",
|
||||
"/DYNAMICBASE",
|
||||
]
|
||||
|
||||
if (win_linker_timing) {
|
||||
ldflags += [
|
||||
"/time",
|
||||
"/verbose:incr",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("default_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
# The CFG guards are only emitted if |win_enable_cfg_guards| is enabled.
|
||||
if (win_enable_cfg_guards) {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard" ]
|
||||
} else {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
}
|
||||
|
||||
# To disable CFG guards for a target, remove the "default_cfg_compiler"
|
||||
# config, and add "disable_guards_cfg_compiler" config.
|
||||
config("disable_guards_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
|
||||
config("cfi_linker") {
|
||||
# Control Flow Guard (CFG)
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
|
||||
# /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG cannot be
|
||||
# turned on either.
|
||||
# ASan and CFG leads to slow process startup. Chromium's test runner uses
|
||||
# lots of child processes, so this means things are really slow. Disable CFG
|
||||
# for now. https://crbug.com/846966
|
||||
if (!is_debug && !is_asan) {
|
||||
# Turn on CFG bitmap generation and CFG load config.
|
||||
ldflags = [ "/guard:cf" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is a superset of all the delayloads needed for chrome.exe, chrome.dll,
|
||||
# and chrome_elf.dll. The linker will automatically ignore anything which is not
|
||||
# linked to the binary at all (it is harmless to have an unmatched /delayload).
|
||||
#
|
||||
# We delayload most libraries as the dlls are simply not required at startup (or
|
||||
# at all, depending on the process type). In unsandboxed process they will load
|
||||
# when first needed.
|
||||
#
|
||||
# Some dlls open handles when they are loaded, and we may not want them to be
|
||||
# loaded in renderers or other sandboxed processes. Conversely, some dlls must
|
||||
# be loaded before sandbox lockdown.
|
||||
#
|
||||
# Some dlls themselves load others - in particular, to avoid unconditionally
|
||||
# loading user32.dll - we require that the following dlls are all delayloaded:
|
||||
# user32, gdi32, comctl32, comdlg32, cryptui, d3d9, dwmapi, imm32, msi, ole32,
|
||||
# oleacc, rstrtmgr, shell32, shlwapi, and uxtheme.
|
||||
#
|
||||
# Advapi32.dll is unconditionally loaded at process startup on Windows 10, but
|
||||
# on Windows 11 it is not, which makes it worthwhile to delay load it.
|
||||
# Additionally, advapi32.dll exports several functions that are forwarded to
|
||||
# other DLLs such as cryptbase.dll. If calls to those functions are present but
|
||||
# there are some processes where the functions are never called then delay
|
||||
# loading of advapi32.dll avoids pulling in those DLLs (such as cryptbase.dll)
|
||||
# unnecessarily, even if advapi32.dll itself is loaded.
|
||||
#
|
||||
# This config applies to chrome.exe, chrome.dll, chrome_elf.dll (& others).
|
||||
#
|
||||
# This config should also be used for any test binary whose goal is to run
|
||||
# tests with the full browser.
|
||||
config("delayloads") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-synch-l1-2-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
|
||||
"/DELAYLOAD:advapi32.dll",
|
||||
"/DELAYLOAD:bcryptprimitives.dll",
|
||||
"/DELAYLOAD:comctl32.dll",
|
||||
"/DELAYLOAD:comdlg32.dll",
|
||||
"/DELAYLOAD:credui.dll",
|
||||
"/DELAYLOAD:cryptui.dll",
|
||||
"/DELAYLOAD:d3d11.dll",
|
||||
"/DELAYLOAD:d3d12.dll",
|
||||
"/DELAYLOAD:d3d9.dll",
|
||||
"/DELAYLOAD:dwmapi.dll",
|
||||
"/DELAYLOAD:dxgi.dll",
|
||||
"/DELAYLOAD:dxva2.dll",
|
||||
"/DELAYLOAD:esent.dll",
|
||||
"/DELAYLOAD:fontsub.dll",
|
||||
"/DELAYLOAD:gdi32.dll",
|
||||
"/DELAYLOAD:hid.dll",
|
||||
"/DELAYLOAD:imagehlp.dll",
|
||||
"/DELAYLOAD:imm32.dll",
|
||||
"/DELAYLOAD:msi.dll",
|
||||
"/DELAYLOAD:netapi32.dll",
|
||||
"/DELAYLOAD:ncrypt.dll",
|
||||
"/DELAYLOAD:ole32.dll",
|
||||
"/DELAYLOAD:oleacc.dll",
|
||||
"/DELAYLOAD:pdh.dll",
|
||||
"/DELAYLOAD:propsys.dll",
|
||||
"/DELAYLOAD:psapi.dll",
|
||||
"/DELAYLOAD:rpcrt4.dll",
|
||||
"/DELAYLOAD:rstrtmgr.dll",
|
||||
"/DELAYLOAD:setupapi.dll",
|
||||
"/DELAYLOAD:shell32.dll",
|
||||
"/DELAYLOAD:shlwapi.dll",
|
||||
"/DELAYLOAD:uiautomationcore.dll",
|
||||
"/DELAYLOAD:urlmon.dll",
|
||||
"/DELAYLOAD:user32.dll",
|
||||
"/DELAYLOAD:usp10.dll",
|
||||
"/DELAYLOAD:uxtheme.dll",
|
||||
"/DELAYLOAD:wer.dll",
|
||||
"/DELAYLOAD:wevtapi.dll",
|
||||
"/DELAYLOAD:wininet.dll",
|
||||
"/DELAYLOAD:winusb.dll",
|
||||
"/DELAYLOAD:wsock32.dll",
|
||||
"/DELAYLOAD:wtsapi32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# This config (along with `:delayloads`) applies to chrome.exe & chrome_elf.dll.
|
||||
# Entries should not appear in both configs.
|
||||
config("delayloads_not_for_child_dll") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:crypt32.dll",
|
||||
"/DELAYLOAD:dbghelp.dll",
|
||||
"/DELAYLOAD:dhcpcsvc.dll",
|
||||
"/DELAYLOAD:dwrite.dll",
|
||||
"/DELAYLOAD:iphlpapi.dll",
|
||||
"/DELAYLOAD:oleaut32.dll",
|
||||
"/DELAYLOAD:secur32.dll",
|
||||
"/DELAYLOAD:userenv.dll",
|
||||
"/DELAYLOAD:winhttp.dll",
|
||||
"/DELAYLOAD:winmm.dll",
|
||||
"/DELAYLOAD:winspool.drv",
|
||||
"/DELAYLOAD:wintrust.dll",
|
||||
"/DELAYLOAD:ws2_32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# CRT --------------------------------------------------------------------------
|
||||
|
||||
# Configures how the runtime library (CRT) is going to be used.
|
||||
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
|
||||
# what each value does.
|
||||
config("default_crt") {
|
||||
if (is_component_build) {
|
||||
# Component mode: dynamic CRT. Since the library is shared, it requires
|
||||
# exceptions or will give errors about things not matching, so keep
|
||||
# exceptions on.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
if (current_os == "winuwp") {
|
||||
# https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/
|
||||
# contains a details explanation of what is happening with the Windows
|
||||
# CRT in Visual Studio releases related to Windows store applications.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
# Desktop Windows: static CRT.
|
||||
configs = [ ":static_crt" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Use this to force use of the release CRT when building perf-critical build
|
||||
# tools that need to be fully optimized even in debug builds, for those times
|
||||
# when the debug CRT is part of the bottleneck. This also avoids *implicitly*
|
||||
# defining _DEBUG.
|
||||
config("release_crt") {
|
||||
if (is_component_build) {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
# On Windows, including libcpmt[d]/msvcprt[d] explicitly links the C++
|
||||
# standard library, which libc++ needs for exception_ptr internals.
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("dynamic_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the DLL debug CRT and defines _DEBUG
|
||||
cflags = [ "/MDd" ]
|
||||
|
||||
# /MDd specifies msvcrtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. Rust defaults to the dynamic+release library, which
|
||||
# we remove here, and then replace. See
|
||||
# https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Clink-arg=/nodefaultlib:msvcrt.lib",
|
||||
"-Clink-arg=msvcrtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("static_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the static debug CRT and defines _DEBUG
|
||||
cflags = [ "/MTd" ]
|
||||
|
||||
# /MTd specifies libcmtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. We tell Rust that we're using the static CRT but
|
||||
# remove the release library that it chooses, and replace with the debug
|
||||
# library. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Ctarget-feature=+crt-static",
|
||||
"-Clink-arg=/nodefaultlib:libcmt.lib",
|
||||
"-Clink-arg=libcmtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Subsystem --------------------------------------------------------------------
|
||||
|
||||
# This is appended to the subsystem to specify a minimum version.
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# Set to 10.0 since we only support >= Win10 since M110.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
|
||||
config("console") {
|
||||
ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
|
||||
}
|
||||
config("windowed") {
|
||||
ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
|
||||
}
|
||||
|
||||
# Incremental linking ----------------------------------------------------------
|
||||
|
||||
# Applies incremental linking or not depending on the current configuration.
|
||||
config("default_incremental_linking") {
|
||||
# Enable incremental linking for debug builds and all component builds - any
|
||||
# builds where performance is not job one.
|
||||
# TODO(thakis): Always turn this on with lld, no reason not to.
|
||||
if (is_debug || is_component_build) {
|
||||
ldflags = [ "/INCREMENTAL" ]
|
||||
if (use_lld) {
|
||||
# lld doesn't use ilk files and doesn't really have an incremental link
|
||||
# mode; the only effect of the flag is that the .lib file timestamp isn't
|
||||
# updated if the .lib doesn't change.
|
||||
# TODO(thakis): Why pass /OPT:NOREF for lld, but not otherwise?
|
||||
# TODO(thakis): /INCREMENTAL is on by default in link.exe, but not in
|
||||
# lld.
|
||||
ldflags += [ "/OPT:NOREF" ]
|
||||
|
||||
# TODO(crbug.com/40267564): Mixing incremental and icf produces an error
|
||||
# in lld-link.
|
||||
ldflags += [ "/OPT:NOICF" ]
|
||||
}
|
||||
} else {
|
||||
ldflags = [ "/INCREMENTAL:NO" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Character set ----------------------------------------------------------------
|
||||
|
||||
# Not including this config means "ansi" (8-bit system codepage).
|
||||
config("unicode") {
|
||||
defines = [
|
||||
"_UNICODE",
|
||||
"UNICODE",
|
||||
]
|
||||
}
|
||||
|
||||
# Lean and mean ----------------------------------------------------------------
|
||||
|
||||
# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have
|
||||
# to have a separate config for it. Remove this config from your target to
|
||||
# get the "bloaty and accommodating" version of windows.h.
|
||||
config("lean_and_mean") {
|
||||
defines = [ "WIN32_LEAN_AND_MEAN" ]
|
||||
}
|
||||
|
||||
# Nominmax --------------------------------------------------------------------
|
||||
|
||||
# Some third party code defines NOMINMAX before including windows.h, which
|
||||
# then causes warnings when it's been previously defined on the command line.
|
||||
# For such targets, this config can be removed.
|
||||
|
||||
config("nominmax") {
|
||||
defines = [ "NOMINMAX" ]
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = true
|
||||
use_avx512 = false
|
||||
use_fma = true
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = true
|
||||
use_avx512 = true
|
||||
use_fma = true
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,713 +0,0 @@
|
|||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/c++/c++.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/rust.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/win/control_flow_guard.gni")
|
||||
import("//build/config/win/visual_studio_version.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
assert(is_win)
|
||||
|
||||
declare_args() {
|
||||
# Turn this on to have the linker output extra timing information.
|
||||
win_linker_timing = false
|
||||
|
||||
# possible values for target_winuwp_version:
|
||||
# "10" - Windows UWP 10
|
||||
# "8.1" - Windows RT 8.1
|
||||
# "8.0" - Windows RT 8.0
|
||||
target_winuwp_version = "10"
|
||||
|
||||
# possible values:
|
||||
# "app" - Windows Store Applications
|
||||
# "phone" - Windows Phone Applications
|
||||
# "system" - Windows Drivers and Tools
|
||||
# "server" - Windows Server Applications
|
||||
# "desktop" - Windows Desktop Applications
|
||||
target_winuwp_family = "app"
|
||||
|
||||
# Set this to use clang-style diagnostics format instead of MSVC-style, which
|
||||
# is useful in e.g. Emacs compilation mode.
|
||||
# E.g.:
|
||||
# Without this, clang emits a diagnostic message like this:
|
||||
# foo/bar.cc(12,34): error: something went wrong
|
||||
# and with this switch, clang emits it like this:
|
||||
# foo/bar.cc:12:34: error: something went wrong
|
||||
use_clang_diagnostics_format = false
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler config that
|
||||
# is applied to all targets. It is here to separate out the logic that is
|
||||
# Windows-only.
|
||||
config("compiler") {
|
||||
if (current_cpu == "x86") {
|
||||
asmflags = [
|
||||
# When /safeseh is specified, the linker will only produce an image if it
|
||||
# can also produce a table of the image's safe exception handlers. This
|
||||
# table specifies for the operating system which exception handlers are
|
||||
# valid for the image. Note that /SAFESEH isn't accepted on the command
|
||||
# line, only /safeseh. This is only accepted by ml.exe, not ml64.exe.
|
||||
"/safeseh",
|
||||
]
|
||||
}
|
||||
|
||||
cflags = [
|
||||
"/Gy", # Enable function-level linking.
|
||||
"/FS", # Preserve previous PDB behavior.
|
||||
"/bigobj", # Some of our files are bigger than the regular limits.
|
||||
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"/Zc:twoPhase",
|
||||
|
||||
# Consistently use backslash as the path separator when expanding the
|
||||
# __FILE__ macro when targeting Windows regardless of the build
|
||||
# environment.
|
||||
"-ffile-reproducible",
|
||||
]
|
||||
}
|
||||
|
||||
# Force C/C++ mode for the given GN detected file type. This is necessary
|
||||
# for precompiled headers where the same source file is compiled in both
|
||||
# modes.
|
||||
cflags_c = [ "/TC" ]
|
||||
cflags_cc = [ "/TP" ]
|
||||
|
||||
cflags += [
|
||||
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
|
||||
# "/Zc:sizedDealloc-",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Required to make the 19041 SDK compatible with clang-cl.
|
||||
# See https://crbug.com/1089996 issue #2 for details.
|
||||
cflags += [ "/D__WRL_ENABLE_FUNCTION_STATICS__" ]
|
||||
|
||||
# Tell clang which version of MSVC to emulate.
|
||||
cflags += [ "-fmsc-version=1934" ]
|
||||
|
||||
if (is_component_build) {
|
||||
cflags += [
|
||||
# Do not export inline member functions. This makes component builds
|
||||
# faster. This is similar to -fvisibility-inlines-hidden.
|
||||
"/Zc:dllexportInlines-",
|
||||
]
|
||||
}
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m32" ]
|
||||
} else {
|
||||
cflags += [ "--target=i386-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "x64") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m64" ]
|
||||
} else {
|
||||
cflags += [ "--target=x86_64-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
cflags += [ "--target=aarch64-pc-windows" ]
|
||||
} else {
|
||||
assert(false, "unknown current_cpu " + current_cpu)
|
||||
}
|
||||
|
||||
# Chrome currently requires SSE3. Clang supports targeting any Intel
|
||||
# microarchitecture. MSVC only supports a subset of architectures, and the
|
||||
# next step after SSE2 will be AVX.
|
||||
# "/fp:fast", enables FMA.
|
||||
# "/arch:AVX512", for AVX2
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"/arch:AVX512",
|
||||
"-msse3",
|
||||
"-mssse3",
|
||||
"-msse4.1",
|
||||
"-msse4.2",
|
||||
"-mpclmul",
|
||||
"-maes",
|
||||
"-mavx",
|
||||
"-mavx2",
|
||||
"-mavx512f",
|
||||
"-mavx512cd",
|
||||
"-mavx512vl",
|
||||
"-mavx512bw",
|
||||
"-mavx512dq",
|
||||
"-mfma",
|
||||
"-mf16c",
|
||||
"-mlzcnt",
|
||||
"-mbmi2",
|
||||
"/clang:-O3",
|
||||
"/clang:-msse3",
|
||||
"/clang:-mssse3",
|
||||
"/clang:-msse4.1",
|
||||
"/clang:-msse4.2",
|
||||
"/clang:-mpclmul",
|
||||
"/clang:-maes",
|
||||
"/clang:-mavx",
|
||||
"/clang:-mavx2",
|
||||
"/clang:-mavx512f",
|
||||
"/clang:-mavx512cd",
|
||||
"/clang:-mavx512vl",
|
||||
"/clang:-mavx512bw",
|
||||
"/clang:-mavx512dq",
|
||||
"/clang:-mfma",
|
||||
"/clang:-mf16c",
|
||||
"/clang:-mlzcnt",
|
||||
"/clang:-mbmi2",
|
||||
"/clang:-ffp-contract=fast",
|
||||
"/clang:-w",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
}
|
||||
|
||||
# Enable ANSI escape codes if something emulating them is around (cmd.exe
|
||||
# doesn't understand ANSI escape codes by default). Make sure to not enable
|
||||
# this if remoteexec is in use, because this will lower cache hits.
|
||||
if (!use_remoteexec &&
|
||||
exec_script("//build/win/use_ansi_codes.py", [], "trim string") ==
|
||||
"True") {
|
||||
cflags += [ "-fansi-escape-codes" ]
|
||||
}
|
||||
|
||||
if (use_clang_diagnostics_format) {
|
||||
cflags += [ "/clang:-fdiagnostics-format=clang" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Disabled with cc_wrapper because of https://github.com/mozilla/sccache/issues/264
|
||||
if (use_lld && !use_thin_lto && cc_wrapper == "") {
|
||||
# /Brepro lets the compiler not write the mtime field in the .obj output.
|
||||
# link.exe /incremental relies on this field to work correctly, but lld
|
||||
# never looks at this timestamp, so it's safe to pass this flag with
|
||||
# lld and get more deterministic compiler output in return.
|
||||
# In LTO builds, the compiler doesn't write .obj files containing mtimes,
|
||||
# so /Brepro is ignored there.
|
||||
cflags += [ "/Brepro" ]
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
|
||||
if (use_lld) {
|
||||
# lld defaults to writing the current time in the pe/coff header.
|
||||
# For build reproducibility, pass an explicit timestamp. See
|
||||
# build/compute_build_timestamp.py for how the timestamp is chosen.
|
||||
# (link.exe also writes the current time, but it doesn't have a flag to
|
||||
# override that behavior.)
|
||||
ldflags += [ "/TIMESTAMP:" + build_timestamp ]
|
||||
|
||||
# Don't look for libpaths in %LIB%, similar to /X in cflags above.
|
||||
ldflags += [ "/lldignoreenv" ]
|
||||
ldflags += [ "/opt:lldlto=3", ]
|
||||
}
|
||||
|
||||
# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size
|
||||
# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps
|
||||
# which is a PDB limit that was hit in https://crbug.com/1406510. The page size
|
||||
# can easily be increased in the future to allow even larger PDBs or larger
|
||||
# block maps.
|
||||
# This flag requires lld-link.exe or link.exe from VS 2022 or later to create
|
||||
# the PDBs, and tools from circa 22H2 or later to consume the PDBs.
|
||||
# Debug component builds can generate PDBs that exceed 8 GiB, so use an
|
||||
# even larger page size, allowing up to 16 GiB PDBs.
|
||||
if (is_debug && !is_component_build) {
|
||||
ldflags += [ "/pdbpagesize:16384" ]
|
||||
} else {
|
||||
ldflags += [ "/pdbpagesize:8192" ]
|
||||
}
|
||||
|
||||
if (!is_debug && !is_component_build) {
|
||||
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
|
||||
# release builds.
|
||||
# Release builds always want these optimizations, so enable them explicitly.
|
||||
ldflags += [
|
||||
"/OPT:REF",
|
||||
"/OPT:ICF",
|
||||
"/INCREMENTAL:NO",
|
||||
"/FIXED:NO",
|
||||
"/OPT:lldlto=3",
|
||||
"-mllvm:-march=skylake-avx512",
|
||||
]
|
||||
|
||||
if (use_lld) {
|
||||
# String tail merging leads to smaller binaries, but they don't compress
|
||||
# as well, leading to increased mini_installer size (crbug.com/838449).
|
||||
# ldflags += [ "/OPT:NOLLDTAILMERGE" ]
|
||||
ldflags += [ "/OPT:LLDTAILMERGE" ]
|
||||
}
|
||||
|
||||
# TODO(siggi): Is this of any use anymore?
|
||||
# /PROFILE ensures that the PDB file contains FIXUP information (growing the
|
||||
# PDB file by about 5%) but does not otherwise alter the output binary. It
|
||||
# is enabled opportunistically for builds where it is not prohibited (not
|
||||
# supported when incrementally linking, or using /debug:fastlink).
|
||||
# ldflags += [ "/PROFILE" ]
|
||||
}
|
||||
|
||||
# arflags apply only to static_libraries. The normal linker configs are only
|
||||
# set for executable and shared library targets so arflags must be set
|
||||
# elsewhere. Since this is relatively contained, we just apply them in this
|
||||
# more general config and they will only have an effect on static libraries.
|
||||
arflags = [
|
||||
# "No public symbols found; archive member will be inaccessible." This
|
||||
# means that one or more object files in the library can never be
|
||||
# pulled in to targets that link to this library. It's just a warning that
|
||||
# the source file is a no-op.
|
||||
"/ignore:4221",
|
||||
]
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler:runtime_library
|
||||
# config that is applied to all targets. It is here to separate out the logic
|
||||
# that is Windows-only. Please see that target for advice on what should go in
|
||||
# :runtime_library vs. :compiler.
|
||||
config("runtime_library") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
|
||||
# Defines that set up the CRT.
|
||||
defines = [
|
||||
"__STD_C",
|
||||
"_CRT_RAND_S",
|
||||
"_CRT_SECURE_NO_DEPRECATE",
|
||||
"_SCL_SECURE_NO_DEPRECATE",
|
||||
]
|
||||
|
||||
# Defines that set up the Windows SDK.
|
||||
defines += [
|
||||
"_ATL_NO_OPENGL",
|
||||
"_WINDOWS",
|
||||
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
|
||||
"PSAPI_VERSION=2",
|
||||
"WIN32",
|
||||
"_SECURE_ATL",
|
||||
]
|
||||
|
||||
if (current_os == "winuwp") {
|
||||
# When targeting Windows Runtime, certain compiler/linker flags are
|
||||
# necessary.
|
||||
defines += [
|
||||
"WINUWP",
|
||||
"__WRL_NO_DEFAULT_LIB__",
|
||||
]
|
||||
if (target_winuwp_family == "app") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP" ]
|
||||
} else if (target_winuwp_family == "phone") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" ]
|
||||
} else if (target_winuwp_family == "system") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM" ]
|
||||
} else if (target_winuwp_family == "server") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SERVER" ]
|
||||
} else {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
cflags_cc += [ "/EHsc" ]
|
||||
|
||||
# This warning is given because the linker cannot tell the difference
|
||||
# between consuming WinRT APIs versus authoring WinRT within static
|
||||
# libraries as such this warning is always given by the linker. Since
|
||||
# consuming WinRT APIs within a library is legitimate but authoring
|
||||
# WinRT APis is not allowed, this warning is disabled to ignore the
|
||||
# legitimate consumption of WinRT APIs within static library builds.
|
||||
arflags = [ "/IGNORE:4264" ]
|
||||
|
||||
if (target_winuwp_version == "10") {
|
||||
defines += [ "WIN10=_WIN32_WINNT_WIN10" ]
|
||||
} else if (target_winuwp_version == "8.1") {
|
||||
defines += [ "WIN8_1=_WIN32_WINNT_WINBLUE" ]
|
||||
} else if (target_winuwp_version == "8.0") {
|
||||
defines += [ "WIN8=_WIN32_WINNT_WIN8" ]
|
||||
}
|
||||
} else {
|
||||
# When not targeting Windows Runtime, make sure the WINAPI family is set
|
||||
# to desktop.
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Chromium only supports Windowes 10+.
|
||||
# Some third-party libraries assume that these defines set what version of
|
||||
# Windows is available at runtime. Targets using these libraries need to
|
||||
# manually override this config for their compiles.
|
||||
config("winver") {
|
||||
defines = [
|
||||
"NTDDI_VERSION=NTDDI_WIN10_NI",
|
||||
|
||||
# We can't say `=_WIN32_WINNT_WIN10` here because some files do
|
||||
# `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
"WINVER=0x0A00",
|
||||
]
|
||||
}
|
||||
|
||||
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
|
||||
config("sdk_link") {
|
||||
if (current_cpu == "x86") {
|
||||
ldflags = [
|
||||
"/SAFESEH", # Not compatible with x64 so use only for x86.
|
||||
"/largeaddressaware",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This default linker setup is provided separately from the SDK setup so
|
||||
# targets who want different library configurations can remove this and specify
|
||||
# their own.
|
||||
config("common_linker_setup") {
|
||||
ldflags = [
|
||||
"/FIXED:NO",
|
||||
"/ignore:4199",
|
||||
"/ignore:4221",
|
||||
"/NXCOMPAT",
|
||||
"/DYNAMICBASE",
|
||||
]
|
||||
|
||||
if (win_linker_timing) {
|
||||
ldflags += [
|
||||
"/time",
|
||||
"/verbose:incr",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("default_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
# The CFG guards are only emitted if |win_enable_cfg_guards| is enabled.
|
||||
if (win_enable_cfg_guards) {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard" ]
|
||||
} else {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
}
|
||||
|
||||
# To disable CFG guards for a target, remove the "default_cfg_compiler"
|
||||
# config, and add "disable_guards_cfg_compiler" config.
|
||||
config("disable_guards_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
|
||||
config("cfi_linker") {
|
||||
# Control Flow Guard (CFG)
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
|
||||
# /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG cannot be
|
||||
# turned on either.
|
||||
# ASan and CFG leads to slow process startup. Chromium's test runner uses
|
||||
# lots of child processes, so this means things are really slow. Disable CFG
|
||||
# for now. https://crbug.com/846966
|
||||
if (!is_debug && !is_asan) {
|
||||
# Turn on CFG bitmap generation and CFG load config.
|
||||
ldflags = [ "/guard:cf" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is a superset of all the delayloads needed for chrome.exe, chrome.dll,
|
||||
# and chrome_elf.dll. The linker will automatically ignore anything which is not
|
||||
# linked to the binary at all (it is harmless to have an unmatched /delayload).
|
||||
#
|
||||
# We delayload most libraries as the dlls are simply not required at startup (or
|
||||
# at all, depending on the process type). In unsandboxed process they will load
|
||||
# when first needed.
|
||||
#
|
||||
# Some dlls open handles when they are loaded, and we may not want them to be
|
||||
# loaded in renderers or other sandboxed processes. Conversely, some dlls must
|
||||
# be loaded before sandbox lockdown.
|
||||
#
|
||||
# Some dlls themselves load others - in particular, to avoid unconditionally
|
||||
# loading user32.dll - we require that the following dlls are all delayloaded:
|
||||
# user32, gdi32, comctl32, comdlg32, cryptui, d3d9, dwmapi, imm32, msi, ole32,
|
||||
# oleacc, rstrtmgr, shell32, shlwapi, and uxtheme.
|
||||
#
|
||||
# Advapi32.dll is unconditionally loaded at process startup on Windows 10, but
|
||||
# on Windows 11 it is not, which makes it worthwhile to delay load it.
|
||||
# Additionally, advapi32.dll exports several functions that are forwarded to
|
||||
# other DLLs such as cryptbase.dll. If calls to those functions are present but
|
||||
# there are some processes where the functions are never called then delay
|
||||
# loading of advapi32.dll avoids pulling in those DLLs (such as cryptbase.dll)
|
||||
# unnecessarily, even if advapi32.dll itself is loaded.
|
||||
#
|
||||
# This config applies to chrome.exe, chrome.dll, chrome_elf.dll (& others).
|
||||
#
|
||||
# This config should also be used for any test binary whose goal is to run
|
||||
# tests with the full browser.
|
||||
config("delayloads") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-synch-l1-2-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
|
||||
"/DELAYLOAD:advapi32.dll",
|
||||
"/DELAYLOAD:bcryptprimitives.dll",
|
||||
"/DELAYLOAD:comctl32.dll",
|
||||
"/DELAYLOAD:comdlg32.dll",
|
||||
"/DELAYLOAD:credui.dll",
|
||||
"/DELAYLOAD:cryptui.dll",
|
||||
"/DELAYLOAD:d3d11.dll",
|
||||
"/DELAYLOAD:d3d12.dll",
|
||||
"/DELAYLOAD:d3d9.dll",
|
||||
"/DELAYLOAD:dwmapi.dll",
|
||||
"/DELAYLOAD:dxgi.dll",
|
||||
"/DELAYLOAD:dxva2.dll",
|
||||
"/DELAYLOAD:esent.dll",
|
||||
"/DELAYLOAD:fontsub.dll",
|
||||
"/DELAYLOAD:gdi32.dll",
|
||||
"/DELAYLOAD:hid.dll",
|
||||
"/DELAYLOAD:imagehlp.dll",
|
||||
"/DELAYLOAD:imm32.dll",
|
||||
"/DELAYLOAD:msi.dll",
|
||||
"/DELAYLOAD:netapi32.dll",
|
||||
"/DELAYLOAD:ncrypt.dll",
|
||||
"/DELAYLOAD:ole32.dll",
|
||||
"/DELAYLOAD:oleacc.dll",
|
||||
"/DELAYLOAD:pdh.dll",
|
||||
"/DELAYLOAD:propsys.dll",
|
||||
"/DELAYLOAD:psapi.dll",
|
||||
"/DELAYLOAD:rpcrt4.dll",
|
||||
"/DELAYLOAD:rstrtmgr.dll",
|
||||
"/DELAYLOAD:setupapi.dll",
|
||||
"/DELAYLOAD:shell32.dll",
|
||||
"/DELAYLOAD:shlwapi.dll",
|
||||
"/DELAYLOAD:uiautomationcore.dll",
|
||||
"/DELAYLOAD:urlmon.dll",
|
||||
"/DELAYLOAD:user32.dll",
|
||||
"/DELAYLOAD:usp10.dll",
|
||||
"/DELAYLOAD:uxtheme.dll",
|
||||
"/DELAYLOAD:wer.dll",
|
||||
"/DELAYLOAD:wevtapi.dll",
|
||||
"/DELAYLOAD:wininet.dll",
|
||||
"/DELAYLOAD:winusb.dll",
|
||||
"/DELAYLOAD:wsock32.dll",
|
||||
"/DELAYLOAD:wtsapi32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# This config (along with `:delayloads`) applies to chrome.exe & chrome_elf.dll.
|
||||
# Entries should not appear in both configs.
|
||||
config("delayloads_not_for_child_dll") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:crypt32.dll",
|
||||
"/DELAYLOAD:dbghelp.dll",
|
||||
"/DELAYLOAD:dhcpcsvc.dll",
|
||||
"/DELAYLOAD:dwrite.dll",
|
||||
"/DELAYLOAD:iphlpapi.dll",
|
||||
"/DELAYLOAD:oleaut32.dll",
|
||||
"/DELAYLOAD:secur32.dll",
|
||||
"/DELAYLOAD:userenv.dll",
|
||||
"/DELAYLOAD:winhttp.dll",
|
||||
"/DELAYLOAD:winmm.dll",
|
||||
"/DELAYLOAD:winspool.drv",
|
||||
"/DELAYLOAD:wintrust.dll",
|
||||
"/DELAYLOAD:ws2_32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# CRT --------------------------------------------------------------------------
|
||||
|
||||
# Configures how the runtime library (CRT) is going to be used.
|
||||
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
|
||||
# what each value does.
|
||||
config("default_crt") {
|
||||
if (is_component_build) {
|
||||
# Component mode: dynamic CRT. Since the library is shared, it requires
|
||||
# exceptions or will give errors about things not matching, so keep
|
||||
# exceptions on.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
if (current_os == "winuwp") {
|
||||
# https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/
|
||||
# contains a details explanation of what is happening with the Windows
|
||||
# CRT in Visual Studio releases related to Windows store applications.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
# Desktop Windows: static CRT.
|
||||
configs = [ ":static_crt" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Use this to force use of the release CRT when building perf-critical build
|
||||
# tools that need to be fully optimized even in debug builds, for those times
|
||||
# when the debug CRT is part of the bottleneck. This also avoids *implicitly*
|
||||
# defining _DEBUG.
|
||||
config("release_crt") {
|
||||
if (is_component_build) {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
# On Windows, including libcpmt[d]/msvcprt[d] explicitly links the C++
|
||||
# standard library, which libc++ needs for exception_ptr internals.
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("dynamic_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the DLL debug CRT and defines _DEBUG
|
||||
cflags = [ "/MDd" ]
|
||||
|
||||
# /MDd specifies msvcrtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. Rust defaults to the dynamic+release library, which
|
||||
# we remove here, and then replace. See
|
||||
# https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Clink-arg=/nodefaultlib:msvcrt.lib",
|
||||
"-Clink-arg=msvcrtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("static_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the static debug CRT and defines _DEBUG
|
||||
cflags = [ "/MTd" ]
|
||||
|
||||
# /MTd specifies libcmtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. We tell Rust that we're using the static CRT but
|
||||
# remove the release library that it chooses, and replace with the debug
|
||||
# library. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Ctarget-feature=+crt-static",
|
||||
"-Clink-arg=/nodefaultlib:libcmt.lib",
|
||||
"-Clink-arg=libcmtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Subsystem --------------------------------------------------------------------
|
||||
|
||||
# This is appended to the subsystem to specify a minimum version.
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# Set to 10.0 since we only support >= Win10 since M110.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
|
||||
config("console") {
|
||||
ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
|
||||
}
|
||||
config("windowed") {
|
||||
ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
|
||||
}
|
||||
|
||||
# Incremental linking ----------------------------------------------------------
|
||||
|
||||
# Applies incremental linking or not depending on the current configuration.
|
||||
config("default_incremental_linking") {
|
||||
# Enable incremental linking for debug builds and all component builds - any
|
||||
# builds where performance is not job one.
|
||||
# TODO(thakis): Always turn this on with lld, no reason not to.
|
||||
if (is_debug || is_component_build) {
|
||||
ldflags = [ "/INCREMENTAL" ]
|
||||
if (use_lld) {
|
||||
# lld doesn't use ilk files and doesn't really have an incremental link
|
||||
# mode; the only effect of the flag is that the .lib file timestamp isn't
|
||||
# updated if the .lib doesn't change.
|
||||
# TODO(thakis): Why pass /OPT:NOREF for lld, but not otherwise?
|
||||
# TODO(thakis): /INCREMENTAL is on by default in link.exe, but not in
|
||||
# lld.
|
||||
ldflags += [ "/OPT:NOREF" ]
|
||||
|
||||
# TODO(crbug.com/40267564): Mixing incremental and icf produces an error
|
||||
# in lld-link.
|
||||
ldflags += [ "/OPT:NOICF" ]
|
||||
}
|
||||
} else {
|
||||
ldflags = [ "/INCREMENTAL:NO" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Character set ----------------------------------------------------------------
|
||||
|
||||
# Not including this config means "ansi" (8-bit system codepage).
|
||||
config("unicode") {
|
||||
defines = [
|
||||
"_UNICODE",
|
||||
"UNICODE",
|
||||
]
|
||||
}
|
||||
|
||||
# Lean and mean ----------------------------------------------------------------
|
||||
|
||||
# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have
|
||||
# to have a separate config for it. Remove this config from your target to
|
||||
# get the "bloaty and accommodating" version of windows.h.
|
||||
config("lean_and_mean") {
|
||||
defines = [ "WIN32_LEAN_AND_MEAN" ]
|
||||
}
|
||||
|
||||
# Nominmax --------------------------------------------------------------------
|
||||
|
||||
# Some third party code defines NOMINMAX before including windows.h, which
|
||||
# then causes warnings when it's been previously defined on the command line.
|
||||
# For such targets, this config can be removed.
|
||||
|
||||
config("nominmax") {
|
||||
defines = [ "NOMINMAX" ]
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = true
|
||||
use_avx512 = true
|
||||
use_fma = true
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "chromeos"
|
||||
is_chromeos_device = false
|
||||
target_cpu = "x64"
|
||||
|
@ -11,7 +17,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = true
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -39,7 +44,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -50,28 +54,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = true
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,6 +1,3 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
# use_polly = true
|
||||
target_os = "mac"
|
||||
target_cpu = "arm64"
|
||||
|
@ -12,7 +9,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
# dcheck_always_on = false
|
||||
# exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
# enable_iterator_debugging = false
|
||||
#disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +36,6 @@ blink_symbol_level = 0
|
|||
# enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,15 +46,11 @@ ffmpeg_branding = "Chrome"
|
|||
# clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
# use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
|
@ -72,7 +63,6 @@ rtc_build_with_neon = true
|
|||
rtc_build_examples = false
|
||||
# rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = true
|
||||
use_avx512 = false
|
||||
use_fma = true
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "mac"
|
||||
target_cpu = "x64"
|
||||
v8_target_cpu = "x64"
|
||||
|
@ -11,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -39,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -50,18 +55,13 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = false
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = false
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
|
@ -70,7 +70,6 @@ rtc_include_ilbc = true
|
|||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = false
|
||||
use_sse41 = false
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x86"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = false
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = false
|
||||
use_sse41 = false
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x86"
|
||||
msvc_use_sse2 = true
|
||||
|
@ -11,7 +17,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -38,7 +43,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -49,14 +53,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -64,16 +64,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = false
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,684 +0,0 @@
|
|||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/c++/c++.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/rust.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/win/control_flow_guard.gni")
|
||||
import("//build/config/win/visual_studio_version.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
assert(is_win)
|
||||
|
||||
declare_args() {
|
||||
# Turn this on to have the linker output extra timing information.
|
||||
win_linker_timing = false
|
||||
|
||||
# possible values for target_winuwp_version:
|
||||
# "10" - Windows UWP 10
|
||||
# "8.1" - Windows RT 8.1
|
||||
# "8.0" - Windows RT 8.0
|
||||
target_winuwp_version = "10"
|
||||
|
||||
# possible values:
|
||||
# "app" - Windows Store Applications
|
||||
# "phone" - Windows Phone Applications
|
||||
# "system" - Windows Drivers and Tools
|
||||
# "server" - Windows Server Applications
|
||||
# "desktop" - Windows Desktop Applications
|
||||
target_winuwp_family = "app"
|
||||
|
||||
# Set this to use clang-style diagnostics format instead of MSVC-style, which
|
||||
# is useful in e.g. Emacs compilation mode.
|
||||
# E.g.:
|
||||
# Without this, clang emits a diagnostic message like this:
|
||||
# foo/bar.cc(12,34): error: something went wrong
|
||||
# and with this switch, clang emits it like this:
|
||||
# foo/bar.cc:12:34: error: something went wrong
|
||||
use_clang_diagnostics_format = false
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler config that
|
||||
# is applied to all targets. It is here to separate out the logic that is
|
||||
# Windows-only.
|
||||
config("compiler") {
|
||||
if (current_cpu == "x86") {
|
||||
asmflags = [
|
||||
# When /safeseh is specified, the linker will only produce an image if it
|
||||
# can also produce a table of the image's safe exception handlers. This
|
||||
# table specifies for the operating system which exception handlers are
|
||||
# valid for the image. Note that /SAFESEH isn't accepted on the command
|
||||
# line, only /safeseh. This is only accepted by ml.exe, not ml64.exe.
|
||||
"/safeseh",
|
||||
]
|
||||
}
|
||||
|
||||
cflags = [
|
||||
"/Gy", # Enable function-level linking.
|
||||
"/FS", # Preserve previous PDB behavior.
|
||||
"/bigobj", # Some of our files are bigger than the regular limits.
|
||||
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"/Zc:twoPhase",
|
||||
|
||||
# Consistently use backslash as the path separator when expanding the
|
||||
# __FILE__ macro when targeting Windows regardless of the build
|
||||
# environment.
|
||||
"-ffile-reproducible",
|
||||
]
|
||||
}
|
||||
|
||||
# Force C/C++ mode for the given GN detected file type. This is necessary
|
||||
# for precompiled headers where the same source file is compiled in both
|
||||
# modes.
|
||||
cflags_c = [ "/TC" ]
|
||||
cflags_cc = [ "/TP" ]
|
||||
|
||||
cflags += [
|
||||
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
|
||||
# "/Zc:sizedDealloc-",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Required to make the 19041 SDK compatible with clang-cl.
|
||||
# See https://crbug.com/1089996 issue #2 for details.
|
||||
cflags += [ "/D__WRL_ENABLE_FUNCTION_STATICS__" ]
|
||||
|
||||
# Tell clang which version of MSVC to emulate.
|
||||
cflags += [ "-fmsc-version=1934" ]
|
||||
|
||||
if (is_component_build) {
|
||||
cflags += [
|
||||
# Do not export inline member functions. This makes component builds
|
||||
# faster. This is similar to -fvisibility-inlines-hidden.
|
||||
"/Zc:dllexportInlines-",
|
||||
]
|
||||
}
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m32" ]
|
||||
} else {
|
||||
cflags += [ "--target=i386-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "x64") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m64" ]
|
||||
} else {
|
||||
cflags += [ "--target=x86_64-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
cflags += [ "--target=aarch64-pc-windows" ]
|
||||
} else {
|
||||
assert(false, "unknown current_cpu " + current_cpu)
|
||||
}
|
||||
|
||||
# Chrome currently requires SSE3. Clang supports targeting any Intel
|
||||
# microarchitecture. MSVC only supports a subset of architectures, and the
|
||||
# next step after SSE2 will be AVX.
|
||||
# "/fp:fast", enables FMA.
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"-mmmx",
|
||||
"-mfxsr",
|
||||
"-msse",
|
||||
"-msse2",
|
||||
"-msse3",
|
||||
"/clang:-O3",
|
||||
"/clang:-mmmx",
|
||||
"/clang:-mfxsr",
|
||||
"/clang:-msse",
|
||||
"/clang:-msse2",
|
||||
"/clang:-msse3",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
}
|
||||
|
||||
# Enable ANSI escape codes if something emulating them is around (cmd.exe
|
||||
# doesn't understand ANSI escape codes by default). Make sure to not enable
|
||||
# this if remoteexec is in use, because this will lower cache hits.
|
||||
if (!use_remoteexec &&
|
||||
exec_script("//build/win/use_ansi_codes.py", [], "trim string") ==
|
||||
"True") {
|
||||
cflags += [ "-fansi-escape-codes" ]
|
||||
}
|
||||
|
||||
if (use_clang_diagnostics_format) {
|
||||
cflags += [ "/clang:-fdiagnostics-format=clang" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Disabled with cc_wrapper because of https://github.com/mozilla/sccache/issues/264
|
||||
if (use_lld && !use_thin_lto && cc_wrapper == "") {
|
||||
# /Brepro lets the compiler not write the mtime field in the .obj output.
|
||||
# link.exe /incremental relies on this field to work correctly, but lld
|
||||
# never looks at this timestamp, so it's safe to pass this flag with
|
||||
# lld and get more deterministic compiler output in return.
|
||||
# In LTO builds, the compiler doesn't write .obj files containing mtimes,
|
||||
# so /Brepro is ignored there.
|
||||
cflags += [ "/Brepro" ]
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
|
||||
if (use_lld) {
|
||||
# lld defaults to writing the current time in the pe/coff header.
|
||||
# For build reproducibility, pass an explicit timestamp. See
|
||||
# build/compute_build_timestamp.py for how the timestamp is chosen.
|
||||
# (link.exe also writes the current time, but it doesn't have a flag to
|
||||
# override that behavior.)
|
||||
ldflags += [ "/TIMESTAMP:" + build_timestamp ]
|
||||
|
||||
# Don't look for libpaths in %LIB%, similar to /X in cflags above.
|
||||
ldflags += [ "/lldignoreenv" ]
|
||||
ldflags += [ "/opt:lldlto=3", ]
|
||||
}
|
||||
|
||||
# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size
|
||||
# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps
|
||||
# which is a PDB limit that was hit in https://crbug.com/1406510. The page size
|
||||
# can easily be increased in the future to allow even larger PDBs or larger
|
||||
# block maps.
|
||||
# This flag requires lld-link.exe or link.exe from VS 2022 or later to create
|
||||
# the PDBs, and tools from circa 22H2 or later to consume the PDBs.
|
||||
# Debug component builds can generate PDBs that exceed 8 GiB, so use an
|
||||
# even larger page size, allowing up to 16 GiB PDBs.
|
||||
if (is_debug && !is_component_build) {
|
||||
ldflags += [ "/pdbpagesize:16384" ]
|
||||
} else {
|
||||
ldflags += [ "/pdbpagesize:8192" ]
|
||||
}
|
||||
|
||||
if (!is_debug && !is_component_build) {
|
||||
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
|
||||
# release builds.
|
||||
# Release builds always want these optimizations, so enable them explicitly.
|
||||
ldflags += [
|
||||
"/OPT:REF",
|
||||
"/OPT:ICF",
|
||||
"/INCREMENTAL:NO",
|
||||
"/FIXED:NO",
|
||||
"/OPT:lldlto=3",
|
||||
]
|
||||
|
||||
if (use_lld) {
|
||||
# String tail merging leads to smaller binaries, but they don't compress
|
||||
# as well, leading to increased mini_installer size (crbug.com/838449).
|
||||
# ldflags += [ "/OPT:NOLLDTAILMERGE" ]
|
||||
ldflags += [ "/OPT:LLDTAILMERGE" ]
|
||||
}
|
||||
|
||||
# TODO(siggi): Is this of any use anymore?
|
||||
# /PROFILE ensures that the PDB file contains FIXUP information (growing the
|
||||
# PDB file by about 5%) but does not otherwise alter the output binary. It
|
||||
# is enabled opportunistically for builds where it is not prohibited (not
|
||||
# supported when incrementally linking, or using /debug:fastlink).
|
||||
# ldflags += [ "/PROFILE" ]
|
||||
}
|
||||
|
||||
# arflags apply only to static_libraries. The normal linker configs are only
|
||||
# set for executable and shared library targets so arflags must be set
|
||||
# elsewhere. Since this is relatively contained, we just apply them in this
|
||||
# more general config and they will only have an effect on static libraries.
|
||||
arflags = [
|
||||
# "No public symbols found; archive member will be inaccessible." This
|
||||
# means that one or more object files in the library can never be
|
||||
# pulled in to targets that link to this library. It's just a warning that
|
||||
# the source file is a no-op.
|
||||
"/ignore:4221",
|
||||
]
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler:runtime_library
|
||||
# config that is applied to all targets. It is here to separate out the logic
|
||||
# that is Windows-only. Please see that target for advice on what should go in
|
||||
# :runtime_library vs. :compiler.
|
||||
config("runtime_library") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
|
||||
# Defines that set up the CRT.
|
||||
defines = [
|
||||
"__STD_C",
|
||||
"_CRT_RAND_S",
|
||||
"_CRT_SECURE_NO_DEPRECATE",
|
||||
"_SCL_SECURE_NO_DEPRECATE",
|
||||
]
|
||||
|
||||
# Defines that set up the Windows SDK.
|
||||
defines += [
|
||||
"_ATL_NO_OPENGL",
|
||||
"_WINDOWS",
|
||||
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
|
||||
"PSAPI_VERSION=2",
|
||||
"WIN32",
|
||||
"_SECURE_ATL",
|
||||
]
|
||||
|
||||
if (current_os == "winuwp") {
|
||||
# When targeting Windows Runtime, certain compiler/linker flags are
|
||||
# necessary.
|
||||
defines += [
|
||||
"WINUWP",
|
||||
"__WRL_NO_DEFAULT_LIB__",
|
||||
]
|
||||
if (target_winuwp_family == "app") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP" ]
|
||||
} else if (target_winuwp_family == "phone") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" ]
|
||||
} else if (target_winuwp_family == "system") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM" ]
|
||||
} else if (target_winuwp_family == "server") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SERVER" ]
|
||||
} else {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
cflags_cc += [ "/EHsc" ]
|
||||
|
||||
# This warning is given because the linker cannot tell the difference
|
||||
# between consuming WinRT APIs versus authoring WinRT within static
|
||||
# libraries as such this warning is always given by the linker. Since
|
||||
# consuming WinRT APIs within a library is legitimate but authoring
|
||||
# WinRT APis is not allowed, this warning is disabled to ignore the
|
||||
# legitimate consumption of WinRT APIs within static library builds.
|
||||
arflags = [ "/IGNORE:4264" ]
|
||||
|
||||
if (target_winuwp_version == "10") {
|
||||
defines += [ "WIN10=_WIN32_WINNT_WIN10" ]
|
||||
} else if (target_winuwp_version == "8.1") {
|
||||
defines += [ "WIN8_1=_WIN32_WINNT_WINBLUE" ]
|
||||
} else if (target_winuwp_version == "8.0") {
|
||||
defines += [ "WIN8=_WIN32_WINNT_WIN8" ]
|
||||
}
|
||||
} else {
|
||||
# When not targeting Windows Runtime, make sure the WINAPI family is set
|
||||
# to desktop.
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Chromium only supports Windowes 10+.
|
||||
# Some third-party libraries assume that these defines set what version of
|
||||
# Windows is available at runtime. Targets using these libraries need to
|
||||
# manually override this config for their compiles.
|
||||
config("winver") {
|
||||
defines = [
|
||||
"NTDDI_VERSION=NTDDI_WIN10_NI",
|
||||
|
||||
# We can't say `=_WIN32_WINNT_WIN10` here because some files do
|
||||
# `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
"WINVER=0x0A00",
|
||||
]
|
||||
}
|
||||
|
||||
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
|
||||
config("sdk_link") {
|
||||
if (current_cpu == "x86") {
|
||||
ldflags = [
|
||||
"/SAFESEH", # Not compatible with x64 so use only for x86.
|
||||
"/largeaddressaware",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This default linker setup is provided separately from the SDK setup so
|
||||
# targets who want different library configurations can remove this and specify
|
||||
# their own.
|
||||
config("common_linker_setup") {
|
||||
ldflags = [
|
||||
"/FIXED:NO",
|
||||
"/ignore:4199",
|
||||
"/ignore:4221",
|
||||
"/NXCOMPAT",
|
||||
"/DYNAMICBASE",
|
||||
]
|
||||
|
||||
if (win_linker_timing) {
|
||||
ldflags += [
|
||||
"/time",
|
||||
"/verbose:incr",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("default_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
# The CFG guards are only emitted if |win_enable_cfg_guards| is enabled.
|
||||
if (win_enable_cfg_guards) {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard" ]
|
||||
} else {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
}
|
||||
|
||||
# To disable CFG guards for a target, remove the "default_cfg_compiler"
|
||||
# config, and add "disable_guards_cfg_compiler" config.
|
||||
config("disable_guards_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
|
||||
config("cfi_linker") {
|
||||
# Control Flow Guard (CFG)
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
|
||||
# /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG cannot be
|
||||
# turned on either.
|
||||
# ASan and CFG leads to slow process startup. Chromium's test runner uses
|
||||
# lots of child processes, so this means things are really slow. Disable CFG
|
||||
# for now. https://crbug.com/846966
|
||||
if (!is_debug && !is_asan) {
|
||||
# Turn on CFG bitmap generation and CFG load config.
|
||||
ldflags = [ "/guard:cf" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is a superset of all the delayloads needed for chrome.exe, chrome.dll,
|
||||
# and chrome_elf.dll. The linker will automatically ignore anything which is not
|
||||
# linked to the binary at all (it is harmless to have an unmatched /delayload).
|
||||
#
|
||||
# We delayload most libraries as the dlls are simply not required at startup (or
|
||||
# at all, depending on the process type). In unsandboxed process they will load
|
||||
# when first needed.
|
||||
#
|
||||
# Some dlls open handles when they are loaded, and we may not want them to be
|
||||
# loaded in renderers or other sandboxed processes. Conversely, some dlls must
|
||||
# be loaded before sandbox lockdown.
|
||||
#
|
||||
# Some dlls themselves load others - in particular, to avoid unconditionally
|
||||
# loading user32.dll - we require that the following dlls are all delayloaded:
|
||||
# user32, gdi32, comctl32, comdlg32, cryptui, d3d9, dwmapi, imm32, msi, ole32,
|
||||
# oleacc, rstrtmgr, shell32, shlwapi, and uxtheme.
|
||||
#
|
||||
# Advapi32.dll is unconditionally loaded at process startup on Windows 10, but
|
||||
# on Windows 11 it is not, which makes it worthwhile to delay load it.
|
||||
# Additionally, advapi32.dll exports several functions that are forwarded to
|
||||
# other DLLs such as cryptbase.dll. If calls to those functions are present but
|
||||
# there are some processes where the functions are never called then delay
|
||||
# loading of advapi32.dll avoids pulling in those DLLs (such as cryptbase.dll)
|
||||
# unnecessarily, even if advapi32.dll itself is loaded.
|
||||
#
|
||||
# This config applies to chrome.exe, chrome.dll, chrome_elf.dll (& others).
|
||||
#
|
||||
# This config should also be used for any test binary whose goal is to run
|
||||
# tests with the full browser.
|
||||
config("delayloads") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-synch-l1-2-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
|
||||
"/DELAYLOAD:advapi32.dll",
|
||||
"/DELAYLOAD:bcryptprimitives.dll",
|
||||
"/DELAYLOAD:comctl32.dll",
|
||||
"/DELAYLOAD:comdlg32.dll",
|
||||
"/DELAYLOAD:credui.dll",
|
||||
"/DELAYLOAD:cryptui.dll",
|
||||
"/DELAYLOAD:d3d11.dll",
|
||||
"/DELAYLOAD:d3d12.dll",
|
||||
"/DELAYLOAD:d3d9.dll",
|
||||
"/DELAYLOAD:dwmapi.dll",
|
||||
"/DELAYLOAD:dxgi.dll",
|
||||
"/DELAYLOAD:dxva2.dll",
|
||||
"/DELAYLOAD:esent.dll",
|
||||
"/DELAYLOAD:fontsub.dll",
|
||||
"/DELAYLOAD:gdi32.dll",
|
||||
"/DELAYLOAD:hid.dll",
|
||||
"/DELAYLOAD:imagehlp.dll",
|
||||
"/DELAYLOAD:imm32.dll",
|
||||
"/DELAYLOAD:msi.dll",
|
||||
"/DELAYLOAD:netapi32.dll",
|
||||
"/DELAYLOAD:ncrypt.dll",
|
||||
"/DELAYLOAD:ole32.dll",
|
||||
"/DELAYLOAD:oleacc.dll",
|
||||
"/DELAYLOAD:pdh.dll",
|
||||
"/DELAYLOAD:propsys.dll",
|
||||
"/DELAYLOAD:psapi.dll",
|
||||
"/DELAYLOAD:rpcrt4.dll",
|
||||
"/DELAYLOAD:rstrtmgr.dll",
|
||||
"/DELAYLOAD:setupapi.dll",
|
||||
"/DELAYLOAD:shell32.dll",
|
||||
"/DELAYLOAD:shlwapi.dll",
|
||||
"/DELAYLOAD:uiautomationcore.dll",
|
||||
"/DELAYLOAD:urlmon.dll",
|
||||
"/DELAYLOAD:user32.dll",
|
||||
"/DELAYLOAD:usp10.dll",
|
||||
"/DELAYLOAD:uxtheme.dll",
|
||||
"/DELAYLOAD:wer.dll",
|
||||
"/DELAYLOAD:wevtapi.dll",
|
||||
"/DELAYLOAD:wininet.dll",
|
||||
"/DELAYLOAD:winusb.dll",
|
||||
"/DELAYLOAD:wsock32.dll",
|
||||
"/DELAYLOAD:wtsapi32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# This config (along with `:delayloads`) applies to chrome.exe & chrome_elf.dll.
|
||||
# Entries should not appear in both configs.
|
||||
config("delayloads_not_for_child_dll") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:crypt32.dll",
|
||||
"/DELAYLOAD:dbghelp.dll",
|
||||
"/DELAYLOAD:dhcpcsvc.dll",
|
||||
"/DELAYLOAD:dwrite.dll",
|
||||
"/DELAYLOAD:iphlpapi.dll",
|
||||
"/DELAYLOAD:oleaut32.dll",
|
||||
"/DELAYLOAD:secur32.dll",
|
||||
"/DELAYLOAD:userenv.dll",
|
||||
"/DELAYLOAD:winhttp.dll",
|
||||
"/DELAYLOAD:winmm.dll",
|
||||
"/DELAYLOAD:winspool.drv",
|
||||
"/DELAYLOAD:wintrust.dll",
|
||||
"/DELAYLOAD:ws2_32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# CRT --------------------------------------------------------------------------
|
||||
|
||||
# Configures how the runtime library (CRT) is going to be used.
|
||||
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
|
||||
# what each value does.
|
||||
config("default_crt") {
|
||||
if (is_component_build) {
|
||||
# Component mode: dynamic CRT. Since the library is shared, it requires
|
||||
# exceptions or will give errors about things not matching, so keep
|
||||
# exceptions on.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
if (current_os == "winuwp") {
|
||||
# https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/
|
||||
# contains a details explanation of what is happening with the Windows
|
||||
# CRT in Visual Studio releases related to Windows store applications.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
# Desktop Windows: static CRT.
|
||||
configs = [ ":static_crt" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Use this to force use of the release CRT when building perf-critical build
|
||||
# tools that need to be fully optimized even in debug builds, for those times
|
||||
# when the debug CRT is part of the bottleneck. This also avoids *implicitly*
|
||||
# defining _DEBUG.
|
||||
config("release_crt") {
|
||||
if (is_component_build) {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
# On Windows, including libcpmt[d]/msvcprt[d] explicitly links the C++
|
||||
# standard library, which libc++ needs for exception_ptr internals.
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("dynamic_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the DLL debug CRT and defines _DEBUG
|
||||
cflags = [ "/MDd" ]
|
||||
|
||||
# /MDd specifies msvcrtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. Rust defaults to the dynamic+release library, which
|
||||
# we remove here, and then replace. See
|
||||
# https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Clink-arg=/nodefaultlib:msvcrt.lib",
|
||||
"-Clink-arg=msvcrtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("static_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the static debug CRT and defines _DEBUG
|
||||
cflags = [ "/MTd" ]
|
||||
|
||||
# /MTd specifies libcmtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. We tell Rust that we're using the static CRT but
|
||||
# remove the release library that it chooses, and replace with the debug
|
||||
# library. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Ctarget-feature=+crt-static",
|
||||
"-Clink-arg=/nodefaultlib:libcmt.lib",
|
||||
"-Clink-arg=libcmtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Subsystem --------------------------------------------------------------------
|
||||
|
||||
# This is appended to the subsystem to specify a minimum version.
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# Set to 10.0 since we only support >= Win10 since M110.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
|
||||
config("console") {
|
||||
ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
|
||||
}
|
||||
config("windowed") {
|
||||
ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
|
||||
}
|
||||
|
||||
# Incremental linking ----------------------------------------------------------
|
||||
|
||||
# Applies incremental linking or not depending on the current configuration.
|
||||
config("default_incremental_linking") {
|
||||
# Enable incremental linking for debug builds and all component builds - any
|
||||
# builds where performance is not job one.
|
||||
# TODO(thakis): Always turn this on with lld, no reason not to.
|
||||
if (is_debug || is_component_build) {
|
||||
ldflags = [ "/INCREMENTAL" ]
|
||||
if (use_lld) {
|
||||
# lld doesn't use ilk files and doesn't really have an incremental link
|
||||
# mode; the only effect of the flag is that the .lib file timestamp isn't
|
||||
# updated if the .lib doesn't change.
|
||||
# TODO(thakis): Why pass /OPT:NOREF for lld, but not otherwise?
|
||||
# TODO(thakis): /INCREMENTAL is on by default in link.exe, but not in
|
||||
# lld.
|
||||
ldflags += [ "/OPT:NOREF" ]
|
||||
|
||||
# TODO(crbug.com/40267564): Mixing incremental and icf produces an error
|
||||
# in lld-link.
|
||||
ldflags += [ "/OPT:NOICF" ]
|
||||
}
|
||||
} else {
|
||||
ldflags = [ "/INCREMENTAL:NO" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Character set ----------------------------------------------------------------
|
||||
|
||||
# Not including this config means "ansi" (8-bit system codepage).
|
||||
config("unicode") {
|
||||
defines = [
|
||||
"_UNICODE",
|
||||
"UNICODE",
|
||||
]
|
||||
}
|
||||
|
||||
# Lean and mean ----------------------------------------------------------------
|
||||
|
||||
# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have
|
||||
# to have a separate config for it. Remove this config from your target to
|
||||
# get the "bloaty and accommodating" version of windows.h.
|
||||
config("lean_and_mean") {
|
||||
defines = [ "WIN32_LEAN_AND_MEAN" ]
|
||||
}
|
||||
|
||||
# Nominmax --------------------------------------------------------------------
|
||||
|
||||
# Some third party code defines NOMINMAX before including windows.h, which
|
||||
# then causes warnings when it's been previously defined on the command line.
|
||||
# For such targets, this config can be removed.
|
||||
|
||||
config("nominmax") {
|
||||
defines = [ "NOMINMAX" ]
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = false
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x86"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = false
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
|
@ -2,8 +2,4 @@
|
|||
|
||||
This directory contains build config files for compiling Thorium/Chromium with [SSE4.1](https://en.wikipedia.org/wiki/SSE4#SSE4.1).
|
||||
|
||||
They can also be edited (and I do exactly this for my occassional Westmere builds) to make [SSE4.2](https://en.wikipedia.org/wiki/SSE4#SSE4.2) builds.
|
||||
|
||||
SSE4.1 is used to target Core 2 Duo systems at a minimum.
|
||||
|
||||
I make SSE4.2 builds for 1st Gen core, since I have a laptop with a 1st gen "Westmere" CPU.
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
# is_chancie_wancie_build = true
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
|
@ -12,7 +18,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -40,7 +45,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
|
@ -51,28 +55,21 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
File diff suppressed because it is too large
Load diff
|
@ -1,680 +0,0 @@
|
|||
# Copyright 2024 The Chromium Authors and Alex313031
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/c++/c++.gni")
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/clang/clang.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/rust.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
import("//build/config/win/control_flow_guard.gni")
|
||||
import("//build/config/win/visual_studio_version.gni")
|
||||
import("//build/timestamp.gni")
|
||||
import("//build/toolchain/rbe.gni")
|
||||
import("//build/toolchain/toolchain.gni")
|
||||
|
||||
assert(is_win)
|
||||
|
||||
declare_args() {
|
||||
# Turn this on to have the linker output extra timing information.
|
||||
win_linker_timing = false
|
||||
|
||||
# possible values for target_winuwp_version:
|
||||
# "10" - Windows UWP 10
|
||||
# "8.1" - Windows RT 8.1
|
||||
# "8.0" - Windows RT 8.0
|
||||
target_winuwp_version = "10"
|
||||
|
||||
# possible values:
|
||||
# "app" - Windows Store Applications
|
||||
# "phone" - Windows Phone Applications
|
||||
# "system" - Windows Drivers and Tools
|
||||
# "server" - Windows Server Applications
|
||||
# "desktop" - Windows Desktop Applications
|
||||
target_winuwp_family = "app"
|
||||
|
||||
# Set this to use clang-style diagnostics format instead of MSVC-style, which
|
||||
# is useful in e.g. Emacs compilation mode.
|
||||
# E.g.:
|
||||
# Without this, clang emits a diagnostic message like this:
|
||||
# foo/bar.cc(12,34): error: something went wrong
|
||||
# and with this switch, clang emits it like this:
|
||||
# foo/bar.cc:12:34: error: something went wrong
|
||||
use_clang_diagnostics_format = false
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler config that
|
||||
# is applied to all targets. It is here to separate out the logic that is
|
||||
# Windows-only.
|
||||
config("compiler") {
|
||||
if (current_cpu == "x86") {
|
||||
asmflags = [
|
||||
# When /safeseh is specified, the linker will only produce an image if it
|
||||
# can also produce a table of the image's safe exception handlers. This
|
||||
# table specifies for the operating system which exception handlers are
|
||||
# valid for the image. Note that /SAFESEH isn't accepted on the command
|
||||
# line, only /safeseh. This is only accepted by ml.exe, not ml64.exe.
|
||||
"/safeseh",
|
||||
]
|
||||
}
|
||||
|
||||
cflags = [
|
||||
"/Gy", # Enable function-level linking.
|
||||
"/FS", # Preserve previous PDB behavior.
|
||||
"/bigobj", # Some of our files are bigger than the regular limits.
|
||||
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"/Zc:twoPhase",
|
||||
|
||||
# Consistently use backslash as the path separator when expanding the
|
||||
# __FILE__ macro when targeting Windows regardless of the build
|
||||
# environment.
|
||||
"-ffile-reproducible",
|
||||
]
|
||||
}
|
||||
|
||||
# Force C/C++ mode for the given GN detected file type. This is necessary
|
||||
# for precompiled headers where the same source file is compiled in both
|
||||
# modes.
|
||||
cflags_c = [ "/TC" ]
|
||||
cflags_cc = [ "/TP" ]
|
||||
|
||||
cflags += [
|
||||
# Work around crbug.com/526851, bug in VS 2015 RTM compiler.
|
||||
# "/Zc:sizedDealloc-",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
# Required to make the 19041 SDK compatible with clang-cl.
|
||||
# See https://crbug.com/1089996 issue #2 for details.
|
||||
cflags += [ "/D__WRL_ENABLE_FUNCTION_STATICS__" ]
|
||||
|
||||
# Tell clang which version of MSVC to emulate.
|
||||
cflags += [ "-fmsc-version=1934" ]
|
||||
|
||||
if (is_component_build) {
|
||||
cflags += [
|
||||
# Do not export inline member functions. This makes component builds
|
||||
# faster. This is similar to -fvisibility-inlines-hidden.
|
||||
"/Zc:dllexportInlines-",
|
||||
]
|
||||
}
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m32" ]
|
||||
} else {
|
||||
cflags += [ "--target=i386-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "x64") {
|
||||
if (host_cpu == "x86" || host_cpu == "x64") {
|
||||
cflags += [ "-m64" ]
|
||||
} else {
|
||||
cflags += [ "--target=x86_64-windows" ]
|
||||
}
|
||||
} else if (current_cpu == "arm64") {
|
||||
cflags += [ "--target=aarch64-pc-windows" ]
|
||||
} else {
|
||||
assert(false, "unknown current_cpu " + current_cpu)
|
||||
}
|
||||
|
||||
# Chrome currently requires SSE3. Clang supports targeting any Intel
|
||||
# microarchitecture. MSVC only supports a subset of architectures, and the
|
||||
# next step after SSE2 will be AVX.
|
||||
# "/fp:fast", enables FMA.
|
||||
if (current_cpu == "x86" || current_cpu == "x64") {
|
||||
cflags += [
|
||||
"-msse3",
|
||||
"-mssse3",
|
||||
"-msse4.1",
|
||||
"/clang:-O3",
|
||||
"/clang:-msse3",
|
||||
"/clang:-mssse3",
|
||||
"/clang:-msse4.1",
|
||||
"-Xclang", "-O3",
|
||||
]
|
||||
}
|
||||
|
||||
# Enable ANSI escape codes if something emulating them is around (cmd.exe
|
||||
# doesn't understand ANSI escape codes by default). Make sure to not enable
|
||||
# this if remoteexec is in use, because this will lower cache hits.
|
||||
if (!use_remoteexec &&
|
||||
exec_script("//build/win/use_ansi_codes.py", [], "trim string") ==
|
||||
"True") {
|
||||
cflags += [ "-fansi-escape-codes" ]
|
||||
}
|
||||
|
||||
if (use_clang_diagnostics_format) {
|
||||
cflags += [ "/clang:-fdiagnostics-format=clang" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Disabled with cc_wrapper because of https://github.com/mozilla/sccache/issues/264
|
||||
if (use_lld && !use_thin_lto && cc_wrapper == "") {
|
||||
# /Brepro lets the compiler not write the mtime field in the .obj output.
|
||||
# link.exe /incremental relies on this field to work correctly, but lld
|
||||
# never looks at this timestamp, so it's safe to pass this flag with
|
||||
# lld and get more deterministic compiler output in return.
|
||||
# In LTO builds, the compiler doesn't write .obj files containing mtimes,
|
||||
# so /Brepro is ignored there.
|
||||
cflags += [ "/Brepro" ]
|
||||
}
|
||||
|
||||
ldflags = []
|
||||
|
||||
if (use_lld) {
|
||||
# lld defaults to writing the current time in the pe/coff header.
|
||||
# For build reproducibility, pass an explicit timestamp. See
|
||||
# build/compute_build_timestamp.py for how the timestamp is chosen.
|
||||
# (link.exe also writes the current time, but it doesn't have a flag to
|
||||
# override that behavior.)
|
||||
ldflags += [ "/TIMESTAMP:" + build_timestamp ]
|
||||
|
||||
# Don't look for libpaths in %LIB%, similar to /X in cflags above.
|
||||
ldflags += [ "/lldignoreenv" ]
|
||||
ldflags += [ "/opt:lldlto=3", ]
|
||||
}
|
||||
|
||||
# Some binaries create PDBs larger than 4 GiB. Increasing the PDB page size
|
||||
# to 8 KiB allows 8 GiB PDBs. The larger page size also allows larger block maps
|
||||
# which is a PDB limit that was hit in https://crbug.com/1406510. The page size
|
||||
# can easily be increased in the future to allow even larger PDBs or larger
|
||||
# block maps.
|
||||
# This flag requires lld-link.exe or link.exe from VS 2022 or later to create
|
||||
# the PDBs, and tools from circa 22H2 or later to consume the PDBs.
|
||||
# Debug component builds can generate PDBs that exceed 8 GiB, so use an
|
||||
# even larger page size, allowing up to 16 GiB PDBs.
|
||||
if (is_debug && !is_component_build) {
|
||||
ldflags += [ "/pdbpagesize:16384" ]
|
||||
} else {
|
||||
ldflags += [ "/pdbpagesize:8192" ]
|
||||
}
|
||||
|
||||
if (!is_debug && !is_component_build) {
|
||||
# Enable standard linker optimizations like GC (/OPT:REF) and ICF in static
|
||||
# release builds.
|
||||
# Release builds always want these optimizations, so enable them explicitly.
|
||||
ldflags += [
|
||||
"/OPT:REF",
|
||||
"/OPT:ICF",
|
||||
"/INCREMENTAL:NO",
|
||||
"/FIXED:NO",
|
||||
"/OPT:lldlto=3",
|
||||
]
|
||||
|
||||
if (use_lld) {
|
||||
# String tail merging leads to smaller binaries, but they don't compress
|
||||
# as well, leading to increased mini_installer size (crbug.com/838449).
|
||||
# ldflags += [ "/OPT:NOLLDTAILMERGE" ]
|
||||
ldflags += [ "/OPT:LLDTAILMERGE" ]
|
||||
}
|
||||
|
||||
# TODO(siggi): Is this of any use anymore?
|
||||
# /PROFILE ensures that the PDB file contains FIXUP information (growing the
|
||||
# PDB file by about 5%) but does not otherwise alter the output binary. It
|
||||
# is enabled opportunistically for builds where it is not prohibited (not
|
||||
# supported when incrementally linking, or using /debug:fastlink).
|
||||
# ldflags += [ "/PROFILE" ]
|
||||
}
|
||||
|
||||
# arflags apply only to static_libraries. The normal linker configs are only
|
||||
# set for executable and shared library targets so arflags must be set
|
||||
# elsewhere. Since this is relatively contained, we just apply them in this
|
||||
# more general config and they will only have an effect on static libraries.
|
||||
arflags = [
|
||||
# "No public symbols found; archive member will be inaccessible." This
|
||||
# means that one or more object files in the library can never be
|
||||
# pulled in to targets that link to this library. It's just a warning that
|
||||
# the source file is a no-op.
|
||||
"/ignore:4221",
|
||||
]
|
||||
}
|
||||
|
||||
# This is included by reference in the //build/config/compiler:runtime_library
|
||||
# config that is applied to all targets. It is here to separate out the logic
|
||||
# that is Windows-only. Please see that target for advice on what should go in
|
||||
# :runtime_library vs. :compiler.
|
||||
config("runtime_library") {
|
||||
cflags = []
|
||||
cflags_cc = []
|
||||
|
||||
# Defines that set up the CRT.
|
||||
defines = [
|
||||
"__STD_C",
|
||||
"_CRT_RAND_S",
|
||||
"_CRT_SECURE_NO_DEPRECATE",
|
||||
"_SCL_SECURE_NO_DEPRECATE",
|
||||
]
|
||||
|
||||
# Defines that set up the Windows SDK.
|
||||
defines += [
|
||||
"_ATL_NO_OPENGL",
|
||||
"_WINDOWS",
|
||||
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
|
||||
"PSAPI_VERSION=2",
|
||||
"WIN32",
|
||||
"_SECURE_ATL",
|
||||
]
|
||||
|
||||
if (current_os == "winuwp") {
|
||||
# When targeting Windows Runtime, certain compiler/linker flags are
|
||||
# necessary.
|
||||
defines += [
|
||||
"WINUWP",
|
||||
"__WRL_NO_DEFAULT_LIB__",
|
||||
]
|
||||
if (target_winuwp_family == "app") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PC_APP" ]
|
||||
} else if (target_winuwp_family == "phone") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP" ]
|
||||
} else if (target_winuwp_family == "system") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SYSTEM" ]
|
||||
} else if (target_winuwp_family == "server") {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_SERVER" ]
|
||||
} else {
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
cflags_cc += [ "/EHsc" ]
|
||||
|
||||
# This warning is given because the linker cannot tell the difference
|
||||
# between consuming WinRT APIs versus authoring WinRT within static
|
||||
# libraries as such this warning is always given by the linker. Since
|
||||
# consuming WinRT APIs within a library is legitimate but authoring
|
||||
# WinRT APis is not allowed, this warning is disabled to ignore the
|
||||
# legitimate consumption of WinRT APIs within static library builds.
|
||||
arflags = [ "/IGNORE:4264" ]
|
||||
|
||||
if (target_winuwp_version == "10") {
|
||||
defines += [ "WIN10=_WIN32_WINNT_WIN10" ]
|
||||
} else if (target_winuwp_version == "8.1") {
|
||||
defines += [ "WIN8_1=_WIN32_WINNT_WINBLUE" ]
|
||||
} else if (target_winuwp_version == "8.0") {
|
||||
defines += [ "WIN8=_WIN32_WINNT_WIN8" ]
|
||||
}
|
||||
} else {
|
||||
# When not targeting Windows Runtime, make sure the WINAPI family is set
|
||||
# to desktop.
|
||||
defines += [ "WINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Chromium only supports Windowes 10+.
|
||||
# Some third-party libraries assume that these defines set what version of
|
||||
# Windows is available at runtime. Targets using these libraries need to
|
||||
# manually override this config for their compiles.
|
||||
config("winver") {
|
||||
defines = [
|
||||
"NTDDI_VERSION=NTDDI_WIN10_NI",
|
||||
|
||||
# We can't say `=_WIN32_WINNT_WIN10` here because some files do
|
||||
# `#if WINVER < 0x0600` without including windows.h before,
|
||||
# and then _WIN32_WINNT_WIN10 isn't yet known to be 0x0A00.
|
||||
"_WIN32_WINNT=0x0A00",
|
||||
"WINVER=0x0A00",
|
||||
]
|
||||
}
|
||||
|
||||
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
|
||||
config("sdk_link") {
|
||||
if (current_cpu == "x86") {
|
||||
ldflags = [
|
||||
"/SAFESEH", # Not compatible with x64 so use only for x86.
|
||||
"/largeaddressaware",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This default linker setup is provided separately from the SDK setup so
|
||||
# targets who want different library configurations can remove this and specify
|
||||
# their own.
|
||||
config("common_linker_setup") {
|
||||
ldflags = [
|
||||
"/FIXED:NO",
|
||||
"/ignore:4199",
|
||||
"/ignore:4221",
|
||||
"/NXCOMPAT",
|
||||
"/DYNAMICBASE",
|
||||
]
|
||||
|
||||
if (win_linker_timing) {
|
||||
ldflags += [
|
||||
"/time",
|
||||
"/verbose:incr",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
config("default_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
# The CFG guards are only emitted if |win_enable_cfg_guards| is enabled.
|
||||
if (win_enable_cfg_guards) {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard" ]
|
||||
} else {
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
}
|
||||
|
||||
# To disable CFG guards for a target, remove the "default_cfg_compiler"
|
||||
# config, and add "disable_guards_cfg_compiler" config.
|
||||
config("disable_guards_cfg_compiler") {
|
||||
# Emit table of address-taken functions for Control-Flow Guard (CFG).
|
||||
# This is needed to allow functions to be called by code that is built
|
||||
# with CFG enabled, such as system libraries.
|
||||
if (is_clang) {
|
||||
cflags = [ "/guard:cf,nochecks" ]
|
||||
}
|
||||
rustflags = [ "-Ccontrol-flow-guard=nochecks" ]
|
||||
}
|
||||
|
||||
config("cfi_linker") {
|
||||
# Control Flow Guard (CFG)
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/mt637065.aspx
|
||||
# /DYNAMICBASE (ASLR) is turned off in debug builds, therefore CFG cannot be
|
||||
# turned on either.
|
||||
# ASan and CFG leads to slow process startup. Chromium's test runner uses
|
||||
# lots of child processes, so this means things are really slow. Disable CFG
|
||||
# for now. https://crbug.com/846966
|
||||
if (!is_debug && !is_asan) {
|
||||
# Turn on CFG bitmap generation and CFG load config.
|
||||
ldflags = [ "/guard:cf" ]
|
||||
}
|
||||
}
|
||||
|
||||
# This is a superset of all the delayloads needed for chrome.exe, chrome.dll,
|
||||
# and chrome_elf.dll. The linker will automatically ignore anything which is not
|
||||
# linked to the binary at all (it is harmless to have an unmatched /delayload).
|
||||
#
|
||||
# We delayload most libraries as the dlls are simply not required at startup (or
|
||||
# at all, depending on the process type). In unsandboxed process they will load
|
||||
# when first needed.
|
||||
#
|
||||
# Some dlls open handles when they are loaded, and we may not want them to be
|
||||
# loaded in renderers or other sandboxed processes. Conversely, some dlls must
|
||||
# be loaded before sandbox lockdown.
|
||||
#
|
||||
# Some dlls themselves load others - in particular, to avoid unconditionally
|
||||
# loading user32.dll - we require that the following dlls are all delayloaded:
|
||||
# user32, gdi32, comctl32, comdlg32, cryptui, d3d9, dwmapi, imm32, msi, ole32,
|
||||
# oleacc, rstrtmgr, shell32, shlwapi, and uxtheme.
|
||||
#
|
||||
# Advapi32.dll is unconditionally loaded at process startup on Windows 10, but
|
||||
# on Windows 11 it is not, which makes it worthwhile to delay load it.
|
||||
# Additionally, advapi32.dll exports several functions that are forwarded to
|
||||
# other DLLs such as cryptbase.dll. If calls to those functions are present but
|
||||
# there are some processes where the functions are never called then delay
|
||||
# loading of advapi32.dll avoids pulling in those DLLs (such as cryptbase.dll)
|
||||
# unnecessarily, even if advapi32.dll itself is loaded.
|
||||
#
|
||||
# This config applies to chrome.exe, chrome.dll, chrome_elf.dll (& others).
|
||||
#
|
||||
# This config should also be used for any test binary whose goal is to run
|
||||
# tests with the full browser.
|
||||
config("delayloads") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-synch-l1-2-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-string-l1-1-0.dll",
|
||||
"/DELAYLOAD:advapi32.dll",
|
||||
"/DELAYLOAD:bcryptprimitives.dll",
|
||||
"/DELAYLOAD:comctl32.dll",
|
||||
"/DELAYLOAD:comdlg32.dll",
|
||||
"/DELAYLOAD:credui.dll",
|
||||
"/DELAYLOAD:cryptui.dll",
|
||||
"/DELAYLOAD:d3d11.dll",
|
||||
"/DELAYLOAD:d3d12.dll",
|
||||
"/DELAYLOAD:d3d9.dll",
|
||||
"/DELAYLOAD:dwmapi.dll",
|
||||
"/DELAYLOAD:dxgi.dll",
|
||||
"/DELAYLOAD:dxva2.dll",
|
||||
"/DELAYLOAD:esent.dll",
|
||||
"/DELAYLOAD:fontsub.dll",
|
||||
"/DELAYLOAD:gdi32.dll",
|
||||
"/DELAYLOAD:hid.dll",
|
||||
"/DELAYLOAD:imagehlp.dll",
|
||||
"/DELAYLOAD:imm32.dll",
|
||||
"/DELAYLOAD:msi.dll",
|
||||
"/DELAYLOAD:netapi32.dll",
|
||||
"/DELAYLOAD:ncrypt.dll",
|
||||
"/DELAYLOAD:ole32.dll",
|
||||
"/DELAYLOAD:oleacc.dll",
|
||||
"/DELAYLOAD:pdh.dll",
|
||||
"/DELAYLOAD:propsys.dll",
|
||||
"/DELAYLOAD:psapi.dll",
|
||||
"/DELAYLOAD:rpcrt4.dll",
|
||||
"/DELAYLOAD:rstrtmgr.dll",
|
||||
"/DELAYLOAD:setupapi.dll",
|
||||
"/DELAYLOAD:shell32.dll",
|
||||
"/DELAYLOAD:shlwapi.dll",
|
||||
"/DELAYLOAD:uiautomationcore.dll",
|
||||
"/DELAYLOAD:urlmon.dll",
|
||||
"/DELAYLOAD:user32.dll",
|
||||
"/DELAYLOAD:usp10.dll",
|
||||
"/DELAYLOAD:uxtheme.dll",
|
||||
"/DELAYLOAD:wer.dll",
|
||||
"/DELAYLOAD:wevtapi.dll",
|
||||
"/DELAYLOAD:wininet.dll",
|
||||
"/DELAYLOAD:winusb.dll",
|
||||
"/DELAYLOAD:wsock32.dll",
|
||||
"/DELAYLOAD:wtsapi32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# This config (along with `:delayloads`) applies to chrome.exe & chrome_elf.dll.
|
||||
# Entries should not appear in both configs.
|
||||
config("delayloads_not_for_child_dll") {
|
||||
ldflags = [
|
||||
"/DELAYLOAD:crypt32.dll",
|
||||
"/DELAYLOAD:dbghelp.dll",
|
||||
"/DELAYLOAD:dhcpcsvc.dll",
|
||||
"/DELAYLOAD:dwrite.dll",
|
||||
"/DELAYLOAD:iphlpapi.dll",
|
||||
"/DELAYLOAD:oleaut32.dll",
|
||||
"/DELAYLOAD:secur32.dll",
|
||||
"/DELAYLOAD:userenv.dll",
|
||||
"/DELAYLOAD:winhttp.dll",
|
||||
"/DELAYLOAD:winmm.dll",
|
||||
"/DELAYLOAD:winspool.drv",
|
||||
"/DELAYLOAD:wintrust.dll",
|
||||
"/DELAYLOAD:ws2_32.dll",
|
||||
]
|
||||
}
|
||||
|
||||
# CRT --------------------------------------------------------------------------
|
||||
|
||||
# Configures how the runtime library (CRT) is going to be used.
|
||||
# See https://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx for a reference of
|
||||
# what each value does.
|
||||
config("default_crt") {
|
||||
if (is_component_build) {
|
||||
# Component mode: dynamic CRT. Since the library is shared, it requires
|
||||
# exceptions or will give errors about things not matching, so keep
|
||||
# exceptions on.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
if (current_os == "winuwp") {
|
||||
# https://blogs.msdn.microsoft.com/vcblog/2014/06/10/the-great-c-runtime-crt-refactoring/
|
||||
# contains a details explanation of what is happening with the Windows
|
||||
# CRT in Visual Studio releases related to Windows store applications.
|
||||
configs = [ ":dynamic_crt" ]
|
||||
} else {
|
||||
# Desktop Windows: static CRT.
|
||||
configs = [ ":static_crt" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Use this to force use of the release CRT when building perf-critical build
|
||||
# tools that need to be fully optimized even in debug builds, for those times
|
||||
# when the debug CRT is part of the bottleneck. This also avoids *implicitly*
|
||||
# defining _DEBUG.
|
||||
config("release_crt") {
|
||||
if (is_component_build) {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
# On Windows, including libcpmt[d]/msvcprt[d] explicitly links the C++
|
||||
# standard library, which libc++ needs for exception_ptr internals.
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("dynamic_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the DLL debug CRT and defines _DEBUG
|
||||
cflags = [ "/MDd" ]
|
||||
|
||||
# /MDd specifies msvcrtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. Rust defaults to the dynamic+release library, which
|
||||
# we remove here, and then replace. See
|
||||
# https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Clink-arg=/nodefaultlib:msvcrt.lib",
|
||||
"-Clink-arg=msvcrtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MD" ]
|
||||
|
||||
# /MD specifies msvcrt.lib as the CRT library, which is the dynamic+release
|
||||
# version. Rust needs to agree, and its default mode is dynamic+release, so
|
||||
# we do nothing here. See https://github.com/rust-lang/rust/issues/39016.
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:msvcprt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("static_crt") {
|
||||
if (is_debug) {
|
||||
# This pulls in the static debug CRT and defines _DEBUG
|
||||
cflags = [ "/MTd" ]
|
||||
|
||||
# /MTd specifies libcmtd.lib as the CRT library. Rust needs to agree, so we
|
||||
# specify it explicitly. We tell Rust that we're using the static CRT but
|
||||
# remove the release library that it chooses, and replace with the debug
|
||||
# library. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [
|
||||
"-Ctarget-feature=+crt-static",
|
||||
"-Clink-arg=/nodefaultlib:libcmt.lib",
|
||||
"-Clink-arg=libcmtd.lib",
|
||||
]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmtd.lib" ]
|
||||
}
|
||||
} else {
|
||||
cflags = [ "/MT" ]
|
||||
|
||||
# /MT specifies libcmt.lib as the CRT library, which is the static+release
|
||||
# version. Rust needs to agree, so we tell it to use the static+release CRT
|
||||
# as well. See https://github.com/rust-lang/rust/issues/39016.
|
||||
rustflags = [ "-Ctarget-feature=+crt-static" ]
|
||||
|
||||
if (use_custom_libcxx) {
|
||||
ldflags = [ "/DEFAULTLIB:libcpmt.lib" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Subsystem --------------------------------------------------------------------
|
||||
|
||||
# This is appended to the subsystem to specify a minimum version.
|
||||
# The number after the comma is the minimum required OS version.
|
||||
# Set to 10.0 since we only support >= Win10 since M110.
|
||||
subsystem_version_suffix = ",10.0"
|
||||
|
||||
config("console") {
|
||||
ldflags = [ "/SUBSYSTEM:CONSOLE$subsystem_version_suffix" ]
|
||||
}
|
||||
config("windowed") {
|
||||
ldflags = [ "/SUBSYSTEM:WINDOWS$subsystem_version_suffix" ]
|
||||
}
|
||||
|
||||
# Incremental linking ----------------------------------------------------------
|
||||
|
||||
# Applies incremental linking or not depending on the current configuration.
|
||||
config("default_incremental_linking") {
|
||||
# Enable incremental linking for debug builds and all component builds - any
|
||||
# builds where performance is not job one.
|
||||
# TODO(thakis): Always turn this on with lld, no reason not to.
|
||||
if (is_debug || is_component_build) {
|
||||
ldflags = [ "/INCREMENTAL" ]
|
||||
if (use_lld) {
|
||||
# lld doesn't use ilk files and doesn't really have an incremental link
|
||||
# mode; the only effect of the flag is that the .lib file timestamp isn't
|
||||
# updated if the .lib doesn't change.
|
||||
# TODO(thakis): Why pass /OPT:NOREF for lld, but not otherwise?
|
||||
# TODO(thakis): /INCREMENTAL is on by default in link.exe, but not in
|
||||
# lld.
|
||||
ldflags += [ "/OPT:NOREF" ]
|
||||
|
||||
# TODO(crbug.com/40267564): Mixing incremental and icf produces an error
|
||||
# in lld-link.
|
||||
ldflags += [ "/OPT:NOICF" ]
|
||||
}
|
||||
} else {
|
||||
ldflags = [ "/INCREMENTAL:NO" ]
|
||||
}
|
||||
}
|
||||
|
||||
# Character set ----------------------------------------------------------------
|
||||
|
||||
# Not including this config means "ansi" (8-bit system codepage).
|
||||
config("unicode") {
|
||||
defines = [
|
||||
"_UNICODE",
|
||||
"UNICODE",
|
||||
]
|
||||
}
|
||||
|
||||
# Lean and mean ----------------------------------------------------------------
|
||||
|
||||
# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have
|
||||
# to have a separate config for it. Remove this config from your target to
|
||||
# get the "bloaty and accommodating" version of windows.h.
|
||||
config("lean_and_mean") {
|
||||
defines = [ "WIN32_LEAN_AND_MEAN" ]
|
||||
}
|
||||
|
||||
# Nominmax --------------------------------------------------------------------
|
||||
|
||||
# Some third party code defines NOMINMAX before including windows.h, which
|
||||
# then causes warnings when it's been previously defined on the command line.
|
||||
# For such targets, this config can be removed.
|
||||
|
||||
config("nominmax") {
|
||||
defines = [ "NOMINMAX" ]
|
||||
}
|
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = false
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
7
other/SSE4.2/README.md
Normal file
7
other/SSE4.2/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Thorium SSE4.2
|
||||
|
||||
This directory contains build config files for compiling Thorium/Chromium with [SSE4.2](https://en.wikipedia.org/wiki/SSE4#SSE4.2).
|
||||
|
||||
SSE4.2 is used to target 1st Gen core i series systems at a minimum.
|
||||
|
||||
I make SSE4.2 builds occasionally, since @midzer has a laptop with a 1st gen "Westmere" CPU.
|
90
other/SSE4.2/args_SSE4.2.gn
Normal file
90
other/SSE4.2/args_SSE4.2.gn
Normal file
|
@ -0,0 +1,90 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "linux"
|
||||
target_cpu = "x64"
|
||||
enable_linux_installer = true
|
||||
enable_distro_version_check = false
|
||||
is_official_build = true
|
||||
is_debug = false
|
||||
enable_stripping = true
|
||||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
enable_resource_allowlist_generation = false
|
||||
enable_profiling = false
|
||||
is_component_build = false
|
||||
symbol_level = 0
|
||||
enable_nacl = false
|
||||
optimize_webui = true
|
||||
enable_webui_tab_strip = true
|
||||
is_clang = true
|
||||
treat_warnings_as_errors = false
|
||||
# llvm_force_head_revision = true
|
||||
use_lld = true
|
||||
use_icf = true
|
||||
is_cfi = true
|
||||
v8_symbol_level = 0
|
||||
v8_enable_fast_torque = true
|
||||
v8_enable_builtins_optimization = true
|
||||
v8_enable_maglev = true
|
||||
v8_enable_turbofan = true
|
||||
# v8_enable_wasm_simd256_revec = true
|
||||
use_v8_context_snapshot = true
|
||||
blink_symbol_level = 0
|
||||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = true
|
||||
enable_cros_media_app = false
|
||||
proprietary_codecs = true
|
||||
ffmpeg_branding = "Chrome"
|
||||
# Set to false for Polly build
|
||||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
use_webaudio_pffft = true
|
||||
use_vaapi = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
enable_cdm_host_verification = false
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
enable_platform_ac3_eac3_audio = true
|
||||
enable_platform_ac4_audio = false
|
||||
enable_platform_dolby_vision = true
|
||||
enable_platform_encrypted_dolby_vision = true
|
||||
enable_platform_mpeg_h_audio = true
|
||||
enable_platform_dts_audio = true
|
||||
enable_mse_mpeg2ts_stream_parser = true
|
||||
use_text_section_splitting = true
|
||||
use_thin_lto = true
|
||||
thin_lto_enable_optimizations = true
|
||||
enable_rust = true
|
||||
enable_all_rust_features = true
|
||||
init_stack_vars_zero = true
|
||||
chrome_pgo_phase = 2
|
||||
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-linux-6613-1726654317-9efb4a436ddaa1f2d5093a81b30fe61aea97c340-1a5e9a204c479d7c92e7444338181b59b4acb420.profdata"
|
2
other/SSE4.2/thor_ver
Normal file
2
other/SSE4.2/thor_ver
Normal file
|
@ -0,0 +1,2 @@
|
|||
Win
|
||||
SSE4.2
|
88
other/SSE4.2/win_SSE4.2_args.gn
Normal file
88
other/SSE4.2/win_SSE4.2_args.gn
Normal file
|
@ -0,0 +1,88 @@
|
|||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = false
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
is_debug = false
|
||||
enable_stripping = true
|
||||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
enable_resource_allowlist_generation = false
|
||||
enable_profiling = false
|
||||
is_component_build = false
|
||||
symbol_level = 0
|
||||
enable_nacl = false
|
||||
optimize_webui = true
|
||||
enable_webui_tab_strip = true
|
||||
is_clang = true
|
||||
treat_warnings_as_errors = false
|
||||
# llvm_force_head_revision = true
|
||||
win_enable_cfg_guards = true
|
||||
use_lld = true
|
||||
v8_symbol_level = 0
|
||||
v8_enable_fast_torque = true
|
||||
v8_enable_builtins_optimization = true
|
||||
v8_enable_maglev = true
|
||||
v8_enable_turbofan = true
|
||||
# v8_enable_wasm_simd256_revec = true
|
||||
use_v8_context_snapshot = true
|
||||
blink_symbol_level = 0
|
||||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
enable_cros_media_app = false
|
||||
proprietary_codecs = true
|
||||
ffmpeg_branding = "Chrome"
|
||||
# Set to false for Polly build
|
||||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
use_webaudio_pffft = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
enable_widevine_cdm_host_verification = true
|
||||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = false
|
||||
enable_vr = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
enable_platform_ac3_eac3_audio = true
|
||||
enable_platform_ac4_audio = false
|
||||
enable_platform_dolby_vision = true
|
||||
enable_platform_encrypted_dolby_vision = true
|
||||
enable_platform_mpeg_h_audio = true
|
||||
enable_platform_dts_audio = true
|
||||
enable_mse_mpeg2ts_stream_parser = true
|
||||
use_text_section_splitting = true
|
||||
use_thin_lto = true
|
||||
thin_lto_enable_optimizations = true
|
||||
enable_rust = true
|
||||
chrome_pgo_phase = 2
|
||||
pgo_data_path = "/home/alex/chromium/src/chrome/build/pgo_profiles/chrome-win64-6613-1727686998-bbc15856830ec38b6da6ce07037a64b4b5703ff1-b3799c76aec7b01c0056374634686353892dd589.profdata"
|
|
@ -3,6 +3,7 @@
|
|||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/chrome_build.gni")
|
||||
import("//build/config/chromeos/args.gni")
|
||||
import("//build/config/chromeos/ui_mode.gni")
|
||||
import("//build/config/compiler/compiler.gni")
|
||||
import("//build/config/compiler/pgo/pgo.gni")
|
||||
|
@ -57,6 +58,14 @@ if (is_android) {
|
|||
import("//third_party/icu/config.gni")
|
||||
}
|
||||
|
||||
# b/365489014: CrOS' chrome.sections_embedded target breaks on component builds;
|
||||
# there's no clear value of supporting it there, so disable it.
|
||||
_cros_generate_embed_section_target = is_chromeos_ash && !is_component_build
|
||||
|
||||
if (_cros_generate_embed_section_target) {
|
||||
import("//build/chromeos/embed_sections.gni")
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
# On macOS, `is_chrome_branded` builds that have been signed locally will not
|
||||
# launch because certain entitlements are tied to the official Google code
|
||||
|
@ -148,6 +157,8 @@ if (!is_android && !is_mac) {
|
|||
configs += [ "//build/config/compiler:thinlto_optimize_max" ]
|
||||
if (is_win) {
|
||||
output_name = "initialexe/thorium"
|
||||
} else if (is_chromeos) {
|
||||
output_name = "chrome"
|
||||
} else {
|
||||
output_name = "thorium"
|
||||
}
|
||||
|
@ -170,6 +181,9 @@ if (!is_android && !is_mac) {
|
|||
"//components/variations/cros_evaluate_seed:evaluate_seed",
|
||||
"//sandbox/linux:chrome_sandbox",
|
||||
]
|
||||
if (build_mojo_proxy) {
|
||||
data_deps += [ "//mojo/proxy:mojo_proxy" ]
|
||||
}
|
||||
deps += [
|
||||
"//components/exo/wayland:test_controller_stub",
|
||||
"//components/exo/wayland:ui_controls_protocol_stub",
|
||||
|
@ -341,6 +355,10 @@ if (!is_android && !is_mac) {
|
|||
|
||||
if (is_chromeos_ash) {
|
||||
public_deps += [ "//ui/lottie" ]
|
||||
deps += [
|
||||
"//chrome/browser/ash/locale",
|
||||
"//chrome/browser/ash/schedqos",
|
||||
]
|
||||
}
|
||||
|
||||
if (is_chromeos_lacros) {
|
||||
|
@ -361,10 +379,6 @@ if (!is_android && !is_mac) {
|
|||
}
|
||||
}
|
||||
|
||||
if (is_chromeos_ash || is_win) {
|
||||
data_deps += [ "//mojo/core:shared_library" ]
|
||||
}
|
||||
|
||||
# These files are used by the installer so we need a public dep.
|
||||
public_deps += [ ":packed_resources" ]
|
||||
|
||||
|
@ -464,6 +478,10 @@ if (is_win) {
|
|||
if (use_aura) {
|
||||
deps += [ "//ui/compositor" ]
|
||||
}
|
||||
|
||||
if (is_chromeos_ash) {
|
||||
deps += [ "//chrome/browser/ash/schedqos" ]
|
||||
}
|
||||
}
|
||||
|
||||
copy("copy_first_run") {
|
||||
|
@ -475,8 +493,7 @@ if (is_win) {
|
|||
chrome_framework_name = chrome_product_full_name + " Framework"
|
||||
chrome_framework_version = chrome_version_full
|
||||
|
||||
verify_dynamic_libraries = !is_component_build && !is_asan && !is_ubsan &&
|
||||
!is_ubsan_vptr && !is_ubsan_security
|
||||
verify_dynamic_libraries = !is_component_build && !is_asan && !is_ubsan_any
|
||||
if (host_os == "mac") {
|
||||
objdump_path = mac_bin_path
|
||||
} else {
|
||||
|
@ -1164,6 +1181,10 @@ if (is_win) {
|
|||
"//third_party/cld_3/src/src:cld_3",
|
||||
]
|
||||
|
||||
if (is_chromeos_ash) {
|
||||
deps += [ "//chrome/browser/ash/schedqos" ]
|
||||
}
|
||||
|
||||
if (is_component_build) {
|
||||
frameworks = [ "Carbon.framework" ]
|
||||
}
|
||||
|
@ -1470,6 +1491,8 @@ group("dependencies") {
|
|||
public_deps += [
|
||||
"//ash/constants",
|
||||
"//chrome/browser/ash",
|
||||
"//chrome/browser/ash/boot_times_recorder",
|
||||
"//chrome/browser/ash/schedqos",
|
||||
"//chromeos",
|
||||
"//chromeos/ash/components/memory",
|
||||
]
|
||||
|
@ -1697,6 +1720,7 @@ if (is_android) {
|
|||
|
||||
if (is_chromeos_ash) {
|
||||
public_deps += [ "//ui/lottie" ]
|
||||
deps += [ "//chrome/browser/ash/schedqos" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1731,7 +1755,11 @@ if (is_linux || is_chromeos) {
|
|||
}
|
||||
}
|
||||
extract_symbols("chrome_symbols") {
|
||||
binary = "$root_out_dir/thorium"
|
||||
if (is_chromeos) {
|
||||
binary = "$root_out_dir/chrome"
|
||||
} else {
|
||||
binary = "$root_out_dir/thorium"
|
||||
}
|
||||
|
||||
if (current_cpu == "x86") {
|
||||
# GYP used "ia32" so keep that naming for back-compat.
|
||||
|
@ -1840,6 +1868,14 @@ if (is_linux || is_chromeos) {
|
|||
}
|
||||
}
|
||||
|
||||
if (_cros_generate_embed_section_target) {
|
||||
embed_sections("section_embedded_chrome_binary") {
|
||||
binary_input = "$root_out_dir/chrome"
|
||||
sections_embedded_binary_output = "$root_out_dir/chrome.sections_embedded"
|
||||
deps = [ ":chrome" ]
|
||||
}
|
||||
}
|
||||
|
||||
if (is_chromeos_lacros && is_official_build) {
|
||||
# This target is responsible for stripping symbols out of lacros files.
|
||||
# Adding/removing targets here, you also need a corresponding change
|
||||
|
|
21
win_args.gn
21
win_args.gn
|
@ -1,7 +1,13 @@
|
|||
visual_studio_version = "2022"
|
||||
# clang_base_path = "/usr/lib/llvm-18"
|
||||
# clang_version = "18"
|
||||
use_sse3 = true
|
||||
use_sse41 = true
|
||||
use_sse42 = true
|
||||
use_avx = true
|
||||
use_avx2 = false
|
||||
use_avx512 = false
|
||||
use_fma = false
|
||||
|
||||
# use_polly = true
|
||||
# use_bolt = true
|
||||
target_os = "win"
|
||||
target_cpu = "x64"
|
||||
is_official_build = true
|
||||
|
@ -10,7 +16,6 @@ enable_stripping = true
|
|||
thin_lto_enable_cache = false
|
||||
dcheck_always_on = false
|
||||
exclude_unwind_tables = true
|
||||
# enable_debugallocation = false
|
||||
enable_iterator_debugging = false
|
||||
disable_fieldtrial_testing_config = true
|
||||
enable_reporting = false
|
||||
|
@ -37,7 +42,6 @@ blink_symbol_level = 0
|
|||
enable_precompiled_headers = false
|
||||
media_use_ffmpeg = true
|
||||
media_use_libvpx = true
|
||||
# enable_hls_sample_aes = true
|
||||
enable_hls_demuxer = true
|
||||
enable_ink = false
|
||||
enable_discovery = false
|
||||
|
@ -48,14 +52,10 @@ ffmpeg_branding = "Chrome"
|
|||
clang_use_chrome_plugins = true
|
||||
enable_ffmpeg_video_decoders = true
|
||||
is_component_ffmpeg = true
|
||||
# use_webaudio_ffmpeg = false
|
||||
use_webaudio_pffft = true
|
||||
# enable_av1_decoder = true
|
||||
# enable_dav1d_decoder = true
|
||||
enable_library_cdms = true
|
||||
enable_widevine = true
|
||||
bundle_widevine_cdm = true
|
||||
# enable_widevine_cdm_component = true
|
||||
# enable_media_foundation_widevine_cdm = true
|
||||
# enable_cdm_host_verification = true
|
||||
enable_cdm_storage_id = true
|
||||
|
@ -63,16 +63,13 @@ enable_widevine_cdm_host_verification = true
|
|||
enable_rlz = true
|
||||
ignore_missing_widevine_signing_cert = true
|
||||
enable_media_drm_storage = true
|
||||
# enable_media_overlay = true
|
||||
enable_hangout_services_extension = false
|
||||
rtc_use_h264 = true
|
||||
rtc_use_h265 = true
|
||||
rtc_include_ilbc = true
|
||||
# rtc_build_with_neon = true
|
||||
rtc_build_examples = false
|
||||
rtc_enable_avx2 = true
|
||||
enable_vr = true
|
||||
# use_vr_assets_component = true
|
||||
enable_platform_hevc = true
|
||||
enable_hevc_parser_and_hw_decoder = true
|
||||
platform_has_optional_hevc_support = true
|
||||
|
|
Loading…
Reference in a new issue