fixup! [M120 Migration][NaCl][PPFWK] Upgradable pepper plugin requirement
[platform/framework/web/chromium-efl.git] / .gn
diff --git a/.gn b/.gn
index c789fe5..3218778 100644 (file)
--- a/.gn
+++ b/.gn
@@ -8,6 +8,10 @@ import("//third_party/angle/dotfile_settings.gni")
 # The location of the build configuration file.
 buildconfig = "//build/config/BUILDCONFIG.gn"
 
+# The python interpreter to use by default. On Windows, this will look
+# for python3.exe and python3.bat.
+script_executable = "python3"
+
 # These arguments override the default values for items in a declare_args
 # block. "gn args" in turn can override these.
 #
@@ -29,18 +33,18 @@ default_args = {
   # also needs to be defined to src/ios/BUILD.gn (respectively removed from both
   # location when it is removed).
 
-  v8_extra_library_files = []
-  v8_experimental_extra_library_files = []
   v8_enable_gdbjit = false
   v8_imminent_deprecation_warnings = false
 
-  # TODO(jochen): Remove this. http://crbug.com/v8/5830,
-  # http://crbug.com/728583.
-  v8_check_microtasks_scopes_consistency = false
-
   # Don't include webrtc's builtin task queue implementation.
   rtc_link_task_queue_impl = false
 
+  # When building with Chromium, `webrtc::Location` is replaced by
+  # `base::Location`. Since WebRTC doesn't use `public_deps` (webrtc:8603), it
+  # would fail to propagate the dependency internally. Instead WebRTC let its
+  # embedders to define it globally for all of its targets.
+  rtc_common_public_deps = [ "//base" ]
+
   # Don't include the iLBC audio codec.
   # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
   # deps on codecs, we can remove this.
@@ -49,528 +53,36 @@ default_args = {
   # Changes some setup for the Crashpad build to set them to build against
   # Chromium's zlib, base, etc.
   crashpad_dependencies = "chromium"
-}
-
-# These are the targets to check headers for by default. The files in targets
-# matching these patterns (see "gn help label_pattern" for format) will have
-# their includes checked for proper dependencies when you run either
-# "gn check" or "gn gen --check".
-check_targets = [
-  "//android_webview/*",
-  "//apps/*",
-  "//ash/*",
-  "//base/*",
-  "//blink/*",
-  "//build/*",
-  "//buildtools/*",
-  "//cc/*",
-
-  #"//chrome/*",          # Many errors: https://crbug.com/949535
-
-  "//chrome/android/*",
-  "//chrome/app/*",
-  "//chrome/app_shim/*",
-
-  #"//chrome/browser/*",  # ~1300 errors
-  #"//chrome/browser:*",  # ~600 errors
-  "//chrome/browser/accessibility/*",
-  "//chrome/browser/android/*",
-  "//chrome/browser/app_mode/*",
-  "//chrome/browser/apps/*",
-  "//chrome/browser/assist_ranker/*",
-  "//chrome/browser/autocomplete/*",
-  "//chrome/browser/autofill/*",
-  "//chrome/browser/background/*",
-  "//chrome/browser/background_fetch/*",
-  "//chrome/browser/background_sync/*",
-  "//chrome/browser/banners/*",
-  "//chrome/browser/bitmap_fetcher/*",
-  "//chrome/browser/bookmarks/*",
-  "//chrome/browser/browsing_data/*",
-  "//chrome/browser/budget_service/*",
-  "//chrome/browser/captive_portal/*",
-  "//chrome/browser/chooser_controller/*",
-  "//chrome/browser/chromeos/*",
-  "//chrome/browser/client_hints/*",
-  "//chrome/browser/clipboard/*",
-  "//chrome/browser/component_updater/*",
-  "//chrome/browser/consent_auditor/*",
-  "//chrome/browser/content_settings/*",
-  "//chrome/browser/crash_upload_list/*",
-  "//chrome/browser/custom_handlers/*",
-  "//chrome/browser/data_saver/*",
-  "//chrome/browser/data_use_measurement/*",
-  "//chrome/browser/dbus/*",
-
-  #"//chrome/browser/devtools/*",  # 93 errors
-  "//chrome/browser/diagnostics/*",
-  "//chrome/browser/domain_reliability/*",
-  "//chrome/browser/dom_distiller/*",
-  "//chrome/browser/downgrade/*",
-  "//chrome/browser/download/*",
-  "//chrome/browser/drive/*",
-  "//chrome/browser/engagement/*",
-  "//chrome/browser/extensions/*",
-  "//chrome/browser/external_protocol/*",
-  "//chrome/browser/favicon/*",
-  "//chrome/browser/feature_engagement/*",
-  "//chrome/browser/feedback/*",
-  "//chrome/browser/first_run/*",
-  "//chrome/browser/gcm/*",
-  "//chrome/browser/generic_sensor/*",
-  "//chrome/browser/geolocation/*",
-  "//chrome/browser/google/*",
-  "//chrome/browser/gpu/*",
-  "//chrome/browser/guest_view/*",
-  "//chrome/browser/hang_monitor/*",
-  "//chrome/browser/history/*",
-  "//chrome/browser/importer/*",
-  "//chrome/browser/infobars/*",
-  "//chrome/browser/installable/*",
-  "//chrome/browser/install_verification/*",
-  "//chrome/browser/internal/*",
-  "//chrome/browser/interstitials/*",
-  "//chrome/browser/invalidation/*",
-  "//chrome/browser/language/*",
-  "//chrome/browser/lifetime/*",
-
-  #"//chrome/browser/loader/*",  # 2 errors
-  "//chrome/browser/local_discovery/*",
-  "//chrome/browser/mac/*",
-
-  #"//chrome/browser/media/*",  # 74 errors
-  "//chrome/browser/media_galleries/*",
-  "//chrome/browser/memory/*",
-  "//chrome/browser/metrics/*",
-  "//chrome/browser/nacl_host/*",
-  "//chrome/browser/navigation_predictor/*",
-  "//chrome/browser/net/*",
-  "//chrome/browser/notifications/*",
-  "//chrome/browser/ntp_snippets/*",
-  "//chrome/browser/ntp_tiles/*",
-  "//chrome/browser/obsolete_system/*",
-  "//chrome/browser/offline_items_collection/*",
-  "//chrome/browser/offline_pages/*",
-  "//chrome/browser/page_load_metrics/*",
-  "//chrome/browser/password_manager/*",
-  "//chrome/browser/payments/*",
-  "//chrome/browser/pdf/*",
-  "//chrome/browser/performance_monitor/*",
-  "//chrome/browser/permissions/*",
-  "//chrome/browser/picture_in_picture/*",
-  "//chrome/browser/plugins/*",
-  "//chrome/browser/policy/*",
-  "//chrome/browser/predictors/*",
-  "//chrome/browser/prefetch/*",
-  "//chrome/browser/prefs/*",
-  "//chrome/browser/prerender/*",
-  "//chrome/browser/previews/*",
-  "//chrome/browser/printing/*",
-  "//chrome/browser/privacy_budget/*",
-  "//chrome/browser/profile_resetter/*",
-  "//chrome/browser/profiles/*",
-
-  #"//chrome/browser/profiling_host/*",  # 16 errors
-  "//chrome/browser/push_messaging/*",
-  "//chrome/browser/recovery/*",
-  "//chrome/browser/renderer_context_menu/*",
-  "//chrome/browser/renderer_host/*",
-  "//chrome/browser/resource_coordinator/*",
-
-  #"//chrome/browser/resources/*",  # 18 errors on ChromeOS
-  "//chrome/browser/rlz/*",
-
-  #"//chrome/browser/safe_browsing/*",  # 239 errors
-  "//chrome/browser/search/*",
-  "//chrome/browser/search_engines/*",
-  "//chrome/browser/search_provider_logos/*",
-  "//chrome/browser/service_process/*",
-  "//chrome/browser/sessions/*",
-  "//chrome/browser/signin/*",
-  "//chrome/browser/speech/*",
-  "//chrome/browser/spellchecker/*",
-  "//chrome/browser/ssl/*",
-  "//chrome/browser/status_icons/*",
-  "//chrome/browser/storage/*",
-  "//chrome/browser/subresource_filter/*",
-  "//chrome/browser/supervised_user/*",
-  "//chrome/browser/sync/*",
-  "//chrome/browser/sync_file_system/*",
-  "//chrome/browser/tab_contents/*",
-  "//chrome/browser/task_manager/*",
-  "//chrome/browser/themes/*",
-  "//chrome/browser/tracing/*",
-  "//chrome/browser/translate/*",
-  "//chrome/browser/ui/*",
-  "//chrome/browser/undo/*",
-  "//chrome/browser/unified_consent/*",
-  "//chrome/browser/update_client/*",
-  "//chrome/browser/upgrade_detector/*",
-  "//chrome/browser/usb/*",
-  "//chrome/browser/vr/*",
-  "//chrome/browser/web_applications/*",
-  "//chrome/browser/webauthn/*",
-  "//chrome/browser/webshare/*",
-  "//chrome/browser/win/*",
-
-  "//chrome/build/*",
-
-  #"//chrome/child/*",  # 1 error on Windows
-  "//chrome/chrome_elf/*",
-  "//chrome/chrome_cleaner/*",
-
-  "//chrome/common/*",
-
-  "//chrome/elevation_service/*",
-
-  #"//chrome/gpu/*",  # 7 errors
-  "//chrome/installer/*",
-
-  #"//chrome/install_static/*",  # 8 errors on Windows
-  "//chrome/nacl/*",
-
-  #"//chrome/notification_helper/*",  # 4 errors on Windows
-  #"//chrome/renderer/*",  # ~30 errors
-  #"//chrome/service/*",  # 2 errors
-  #"//chrome/services/*",  # ~30 errors
-  #"//chrome/test/*",  # ~1900 errors
-  "//chrome/test/chromedriver",
-  "//chrome/third_party/*",
-  "//chrome/tools/*",
-  "//chrome/updater/*",
-  "//chrome/utility/*",
-
-  "//chromecast/*",
-  "//chromeos/*",
-  "//cloud_print/*",
-  "//components/*",
-  "//content/*",
-  "//courgette/*",
-  "//crypto/*",
-  "//data/*",
-  "//dbus/*",
-  "//device/*",
 
-  #"//extensions/*",  # Lots of errors.
-  "//extensions:extensions_resources",
-  "//extensions:extensions_browsertests",
-  "//extensions:extensions_unittests",
-  "//extensions/browser",
-  "//extensions/browser:core_api_provider",
-  "//extensions/browser:browser_tests",
-  "//extensions/browser:test_support",
-  "//extensions/browser:unit_tests",
-  "//extensions/browser/api:api_registration",
-  "//extensions/browser/install:*",
-  "//extensions/browser/kiosk/*",
-  "//extensions/browser/guest_view/web_view/web_ui/*",
-  "//extensions/common/*",
-  "//extensions/components/javascript_dialog_extensions_client",
-  "//extensions/components/native_app_window",
-  "//extensions/renderer/*",
-  "//extensions/shell/*",
-  "//extensions/strings/*",
-  "//fuchsia/*",
-  "//gin/*",
-  "//google_apis/*",
-  "//google_update/*",
-  "//gpu/*",
+  # Override ANGLE's Vulkan dependencies.
+  angle_vulkan_headers_dir = "//third_party/vulkan-deps/vulkan-headers/src"
+  angle_vulkan_loader_dir = "//third_party/vulkan-deps/vulkan-loader/src"
+  angle_vulkan_tools_dir = "//third_party/vulkan-deps/vulkan-tools/src"
+  angle_vulkan_validation_layers_dir =
+      "//third_party/vulkan-deps/vulkan-validation-layers/src"
 
-  "//ios/*",
-  "//ios_internal/*",
-  "//ipc/*",
+  # Overwrite default args declared in the Fuchsia sdk
+  fuchsia_sdk_readelf_exec =
+      "//third_party/llvm-build/Release+Asserts/bin/llvm-readelf"
 
-  #"//jingle/*",
+  # Overwrite default args declared in the pdfium library
+  pdf_use_partition_alloc_new_location = true
 
-  "//libassistant/communication/*",
-  "//libinteraction/*",
-
-  "//media/*",
-  "//mojo/*",
-
-  #"//native_client/*",
-  "//net/*",
-
-  #"//pdf/*",  # Medium-hard.
-  #"//ppapi/*",  # Lots of errors.
-  "//ppapi/examples/*",
-  "//ppapi/tests/*",
-  "//printing/*",
-
-  #"//remoting/*",  # Medium-hard.
-  "//rlz/*",
-
-  #"//sandbox/*",  # Medium-hard.
-  "//services/*",
-  "//skia/*",
-  "//sql/*",
-  "//storage/*",
-  "//testing/*",
-
-  #"//third_party/*",  # May not ever want this.
-  "//third_party:freetype_harfbuzz",
-  "//third_party/Python-Markdown/*",
-  "//third_party/SPIRV-Tools/*",
-  "//third_party/abseil-cpp/*",
-  "//third_party/accessibility-audit/*",
-  "//third_party/accessibility_test_framework/*",
-  "//third_party/adobe/*",
-  "//third_party/afl/*",
-  "//third_party/android_build_tools/*",
-  "//third_party/android_crazy_linker/*",
-  "//third_party/android_data_chart/*",
-  "//third_party/android_deps/*",
-  "//third_party/android_media/*",
-  "//third_party/android_ndk/*",
-  "//third_party/android_opengl/*",
-  "//third_party/android_platform/*",
-  "//third_party/android_protobuf/*",
-  "//third_party/android_sdk/*",
-  "//third_party/android_support_test_runner/*",
-  "//third_party/android_swipe_refresh/*",
-  "//third_party/android_system_sdk/*",
-  "//third_party/android_testrunner/*",
-  "//third_party/angle/*",
-  "//third_party/apache-portable-runtime/*",
-  "//third_party/apache_velocity/*",
-  "//third_party/apache-win32/*",
-  "//third_party/apk-patch-size-estimator/*",
-  "//third_party/apple_apsl/*",
-  "//third_party/appurify-python/*",
-  "//third_party/arcore-android-sdk/*",
-  "//third_party/ashmem/*",
-  "//third_party/axe-core/*",
-  "//third_party/bazel/*",
-  "//third_party/blanketjs/*",
-
-  # "//third_party/blink/*",  # Errors: https://crbug.com/800764
-  "//third_party/blink/public/*",
-  "//third_party/blink/common/privacy_budget/*",
-
-  #"//third_party/breakpad/*",  # Small errors.
-  "//third_party/boringssl/*",
-  "//third_party/bouncycastle/*",
-  "//third_party/brotli/*",
-  "//third_party/bspatch/*",
-  "//third_party/byte_buddy/*",
-  "//third_party/cacheinvalidation/*",
-  "//third_party/catapult/*",
-
-  # "//third_party/ced/*",  # 6 errors
-  "//third_party/chaijs/*",
-  "//third_party/checkstyle/*",
-  "//third_party/chromevox/*",
-  "//third_party/chromite/*",
-  "//third_party/cld_2/*",
-  "//third_party/cld_3/*",
-  "//third_party/closure_compiler/*",
-  "//third_party/colorama/*",
-
-  # "//third_party/crashpad/*", 20ish errors
-  "//third_party/crc32c/*",
-  "//third_party/cros_system_api/*",
-  "//third_party/cython/*",
-  "//third_party/d3/*",
-  "//third_party/dawn/*",
-  "//third_party/decklink/*",
-  "//third_party/depot_tools/*",
-  "//third_party/deqp/*",
-  "//third_party/devscripts/*",
-  "//third_party/dom_distiller_js/*",
-  "//third_party/elfutils/*",
-  "//third_party/espresso/*",
-  "//third_party/expat/*",
-  "//third_party/eyesfree/*",
-
-  # "//third_party/ffmpeg/*",  # android_cronet only https://crbug.com/898793
-  "//third_party/flac/*",
-  "//third_party/flatbuffers/*",
-  "//third_party/fontconfig/*",
-  "//third_party/freetype/*",
-  "//third_party/freetype2/*",
-  "//third_party/freetype-android/*",
-  "//third_party/fuchsia-sdk/*",
-  "//third_party/gif_player/*",
-  "//third_party/glfw/*",
-  "//third_party/glslang/*",
-  "//third_party/google_appengine_cloudstorage/*",
-  "//third_party/google_input_tools/*",
-  "//third_party/googletest/*",
-  "//third_party/google_toolbox_for_mac/*",
-  "//third_party/google-truth/*",
-  "//third_party/gradle_wrapper/*",
-  "//third_party/guava/*",
-  "//third_party/gvr-android-keyboard/*",
-  "//third_party/gvr-android-sdk/*",
-  "//third_party/hamcrest/*",
-  "//third_party/harfbuzz-ng/*",
-  "//third_party/hunspell/*",
-  "//third_party/hunspell/*",
-  "//third_party/hunspell_dictionaries/*",
-  "//third_party/iaccessible2/*",
-  "//third_party/iccjpeg/*",
-
-  # "//third_party/icu/*",  # Many errors
-  "//third_party/icu4j/*",
-  "//third_party/ijar/*",
-  "//third_party/ink/*",
-  "//third_party/inspector_protocol/*",
-  "//third_party/instrumented_libraries/*",
-  "//third_party/isimpledom/*",
-  "//third_party/javax_inject/*",
-  "//third_party/jinja2/*",
-  "//third_party/jsoncpp/*",
-  "//third_party/jstemplate/*",
-  "//third_party/junit/*",
-  "//third_party/khronos/*",
-  "//third_party/lcov/*",
-  "//third_party/leakcanary/*",
-  "//third_party/leveldatabase/*",
-  "//third_party/libFuzzer/*",
-  "//third_party/libXNVCtrl/*",
-  "//third_party/libaddressinput/*",
-
-  # "//third_party/libaom/*",  # https://crbug.com/899771
-  "//third_party/libc++/*",
-  "//third_party/libc++abi/*",
-  "//third_party/libdrm/*",
-  "//third_party/libgav1/*",
-  "//third_party/libjingle/*",
-
-  # "//third_party/libjingle_xmpp/*",  # 30ish errors
-  "//third_party/libjpeg/*",
-
-  # "//third_party/libjpeg_turbo/*",  # 3 errors
-  # "//third_party/liblouis/*",  # Small errors
-  "//third_party/libovr/*",
-  "//third_party/libphonenumber/*",
-  "//third_party/libpng/*",
-  "//third_party/libprotobuf-mutator/*",
-  "//third_party/libsecret/*",
-  "//third_party/libsrtp/*",
-  "//third_party/libsync/*",
-  "//third_party/libudev/*",
-  "//third_party/libusb/*",
-
-  # "//third_party/libvpx/*",  # Many errors
-  "//third_party/libvpx_new/*",
-  "//third_party/libwebm/*",
-
-  #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
-  "//third_party/libxml/*",
-  "//third_party/libxslt/*",
-  "//third_party/libyuv/*",
-  "//third_party/llvm/*",
-  "//third_party/llvm-bootstrap/*",
-  "//third_party/llvm-bootstrap-install/*",
-  "//third_party/llvm-build-tools/*",
-  "//third_party/logilab/*",
-  "//third_party/lss/*",
-  "//third_party/lzma_sdk/*",
-  "//third_party/markdown/*",
-  "//third_party/markupsafe/*",
-  "//third_party/material_design_icons/*",
-  "//third_party/mesa_headers/*",
-  "//third_party/metrics_proto/*",
-  "//third_party/minigbm/*",
-  "//third_party/minizip/*",
-  "//third_party/mocha/*",
-  "//third_party/mockito/*",
-  "//third_party/modp_b64/*",
-  "//third_party/motemplate/*",
-  "//third_party/mozilla/*",
-  "//third_party/mtpd/*",
-  "//third_party/netty4/*",
-  "//third_party/netty-tcnative/*",
-  "//third_party/node/*",
-  "//third_party/nvml/*",
-  "//third_party/objenesis/*",
-  "//third_party/ocmock/*",
-  "//third_party/openh264/*",
-  "//third_party/openvr/*",
-  "//third_party/opus/*",
-  "//third_party/ots/*",
-
-  # "//third_party/pdfium/*",  # 3 errors
-  "//third_party/perfetto/*",
-  "//third_party/pexpect/*",
-  "//third_party/ply/*",
-  "//third_party/polymer/*",
-  "//third_party/proguard/*",
-  "//third_party/protobuf/*",
-  "//third_party/pycoverage/*",
-  "//third_party/pyelftools/*",
-  "//third_party/pyjson5/*",
-  "//third_party/pylint/*",
-  "//third_party/pymock/*",
-  "//third_party/pystache/*",
-  "//third_party/py_trace_event/*",
-  "//third_party/pywebsocket3/*",
-  "//third_party/qcms/*",
-  "//third_party/quic_trace/*",
-  "//third_party/qunit/*",
-  "//third_party/r8/*",
-  "//third_party/re2/*",
-  "//third_party/requests/*",
-  "//third_party/retrolambda/*",
-  "//third_party/rnnoise/*",
-  "//third_party/robolectric/*",
-  "//third_party/s2cellid/*",
-  "//third_party/safe_browsing/*",
-  "//third_party/scan-build/*",
-  "//third_party/shaderc/*",
-  "//third_party/simplejson/*",
-  "//third_party/sinonjs/*",
-  "//third_party/skia/*",
-  "//third_party/smhasher/*",
-  "//third_party/snappy/*",
-  "//third_party/speech-dispatcher/*",
-  "//third_party/spirv-cross/*",
-  "//third_party/spirv-headers/*",
-  "//third_party/sqlite/*",
-  "//third_party/sqlite4java/*",
-  "//third_party/stp/*",
-  "//third_party/sudden_motion_sensor/*",
-  "//third_party/swiftshader/*",
-  "//third_party/swig/*",
-  "//third_party/tcmalloc/*",
-  "//third_party/test_fonts/*",
-  "//third_party/tlslite/*",
-  "//third_party/ub-uiautomator/*",
-  "//third_party/unrar/*",
-  "//third_party/usb_ids/*",
-  "//third_party/usrsctp/*",
-  "//third_party/v4l-utils/*",
-  "//third_party/valgrind/*",
-  "//third_party/vulkan/*",
-  "//third_party/vulkan-validation-layers/*",
-
-  # "//third_party/wayland/*",  # Small errors
-  "//third_party/wayland-protocols/*",
-  "//third_party/wds/*",
-  "//third_party/web-animations-js/*",
-  "//third_party/webdriver/*",
-  "//third_party/webgl/*",
-  "//third_party/webpagereplay/*",
-  "//third_party/webrtc/*",
-  "//third_party/webrtc_overrides/*",
-  "//third_party/widevine/*",
-  "//third_party/win_build_output/*",
-  "//third_party/woff2/*",
-  "//third_party/wtl/*",
-  "//third_party/xdg-utils/*",
-  "//third_party/xstream/*",
-  "//third_party/yasm/*",
-  "//third_party/zlib/*",
-  "//third_party/woff2/*",
-
-  "//tools/*",
-  "//ui/*",
-  "//url/*",
-
-  #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
+  devtools_visibility = [ "*" ]
+}
 
-  "//weblayer/*",
+# These are the targets to skip header checking by default. The files in targets
+# matching these patterns (see "gn help label_pattern" for format) will not have
+# their includes checked for proper dependencies when you run either
+# "gn check" or "gn gen --check".
+no_check_targets = [
+  # //v8, https://crbug.com/v8/7330
+  "//v8/src/inspector:inspector",  # 20 errors
+  "//v8/test/cctest:cctest_sources",  # 15 errors
+  "//v8/test/unittests:inspector_unittests_sources",  # 2 errors
+  "//v8:cppgc_base",  # 1 error
+  "//v8:v8_internal_headers",  # 11 errors
+  "//v8:v8_libplatform",  # 2 errors
 ]
 
 # These are the list of GN files that run exec_script. This whitelist exists
@@ -639,6 +151,7 @@ exec_script_whitelist =
       "//build_overrides/build.gni",
 
       "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
+      "//chrome/version.gni",
 
       # TODO(dgn): Layer violation but breaks the build otherwise, see
       # https://crbug.com/474506.