[M94 Dev][EFL] Fix gn errors to generate ninja files 95/264495/1
authorChandan Padhi <c.padhi@samsung.com>
Thu, 23 Sep 2021 07:09:03 +0000 (12:39 +0530)
committerChandan Padhi <c.padhi@samsung.com>
Thu, 23 Sep 2021 07:10:53 +0000 (12:40 +0530)
This commit fixes gn related errors to generate ninja
files for compilation to begin in desktop build.

Change-Id: I068d53933fc2a460d1bbfb2721a921d69b30e4c7
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
27 files changed:
base/BUILD.gn
build/config/compiler/compiler.gni
build/config/linux/gtk/gtk.gni
content/BUILD.gn
content/browser/BUILD.gn
content/child/BUILD.gn
content/common/BUILD.gn
content/gpu/BUILD.gn
content/renderer/BUILD.gn
content/utility/speech/BUILD.gn
content/zygote/BUILD.gn
gpu/config/BUILD.gn
net/BUILD.gn
services/audio/BUILD.gn
services/device/generic_sensor/BUILD.gn
services/device/hid/BUILD.gn
services/device/serial/BUILD.gn
services/device/time_zone_monitor/BUILD.gn
services/device/usb/BUILD.gn
services/network/BUILD.gn
third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
tizen_src/.gn
tizen_src/build/config/tizen_features.gni
tizen_src/build/gn_chromiumefl.sh
tizen_src/chromium_impl/ui/ui_efl.gni
tizen_src/ewk/efl_integration/BUILD.gn
ui/base/cursor/BUILD.gn

index aad598e..3571522 100644 (file)
@@ -1319,7 +1319,6 @@ component("base") {
     }
 
     if (is_linux || is_tizen || is_chromeos) {
-      set_sources_assignment_filter([])
       sources += [
         "base_paths_posix.cc",
         "debug/elf_reader.cc",
@@ -1327,7 +1326,6 @@ component("base") {
         "stack_canary_linux.cc",
         "stack_canary_linux.h",
       ]
-      set_sources_assignment_filter(sources_assignment_filter)
     }
   }
 
index 6f1faaf..544d7da 100644 (file)
@@ -29,7 +29,7 @@ declare_args() {
   # warnings with known toolchains. Allow overriding this e.g. for Chromium
   # builds on Linux that could use a different version of the compiler.
   # With GCC, warnings in no-Chromium code are always not treated as errors.
-  treat_warnings_as_errors = true
+  treat_warnings_as_errors = !use_efl
 
   # How many symbols to include in the build. This affects the performance of
   # the build since the symbols are large and dealing with them is slow.
index 1e45248..caebbdf 100644 (file)
@@ -6,5 +6,5 @@ import("//build/config/ui.gni")
 
 declare_args() {
   # Whether or not we should use libgtk.
-  use_gtk = is_linux && !is_chromecast
+  use_gtk = is_linux && !is_chromecast && !use_efl
 }
index 00d85af..bad4668 100644 (file)
@@ -108,12 +108,10 @@ if (is_component_build) {
   }
 } else if (is_tizen) {
   source_set("content") {
-    set_sources_assignment_filter([])
     sources = [
       "common/sandbox_linux/sandbox_seccomp_bpf_linux.cc",
       "public/common/content_switches.cc",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
     defines = [ "USE_SECCOMP_BPF=1" ]
   }
 } else {
index c318ddd..8b2cf3c 100644 (file)
@@ -3037,7 +3037,6 @@ source_set("browser") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "child_process_launcher_helper_linux.cc",
       "memory/swap_metrics_driver_impl_linux.cc",
@@ -3050,14 +3049,6 @@ source_set("browser") {
       "zygote_host/zygote_host_impl_linux.cc",
       "zygote_host/zygote_host_impl_linux.h",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
-  }
-
-  if (use_viz_devtools) {
-    sources += [
-      "gpu/viz_devtools_connector.cc",
-      "gpu/viz_devtools_connector.h",
-    ]
   }
 
   if (enable_vr) {
index 33d4fad..5af3f55 100644 (file)
@@ -116,7 +116,6 @@ target(link_target_type, "child") {
   ]
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "child_process_sandbox_support_impl_linux.cc",
       "child_process_sandbox_support_impl_linux.h",
@@ -125,7 +124,6 @@ target(link_target_type, "child") {
       "//components/services/font/public/cpp",
       "//components/services/font/public/mojom",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_linux || is_chromeos) {
@@ -173,9 +171,7 @@ target(link_target_type, "child") {
     ]
   }
 
-  configs += [
-    "//content:content_implementation",
-  ]
+  configs += [ "//content:content_implementation" ]
 }
 
 # See comment at the top of //content/BUILD.gn for how this works.
index c1272dc..b9a3683 100644 (file)
@@ -299,7 +299,6 @@ source_set("common") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "common_sandbox_support_linux.cc",
       "zygote/sandbox_support_linux.cc",
@@ -317,8 +316,6 @@ source_set("common") {
         "zygote/zygote_handle_linux.cc",
       ]
     }
-
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_mac) {
index 6734795..78acaaa 100644 (file)
@@ -93,9 +93,7 @@ target(link_target_type, "gpu_sources") {
   ]
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [ "gpu_sandbox_hook_linux.cc" ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (!is_chromeos_ash || !is_chrome_branded) {
index 176abcb..a476102 100644 (file)
@@ -588,12 +588,10 @@ target(link_target_type, "renderer") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "render_view_linux.cc",
       "renderer_main_platform_delegate_linux.cc",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 }
 
index 8f933ba..71d9a2c 100644 (file)
@@ -9,12 +9,10 @@ source_set("speech_recognition_sandbox_hook") {
   ]
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "speech_recognition_sandbox_hook_linux.cc",
       "speech_recognition_sandbox_hook_linux.h",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   deps = [
index dd3b545..9e07f44 100644 (file)
@@ -7,14 +7,12 @@ import("//content/public/common/zygote/features.gni")
 
 if (is_linux || is_tizen || is_chromeos) {
   source_set("zygote") {
-    set_sources_assignment_filter([])
     sources = [
       "zygote_linux.cc",
       "zygote_linux.h",
       "zygote_main.h",
       "zygote_main_linux.cc",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
     deps = [
       "//base",
       "//base:i18n",
index df095fd..2581c01 100644 (file)
@@ -163,11 +163,6 @@ source_set("config_sources") {
     "skia_limits.h",
   ]
 
-  if (use_efl) {
-    sources += external_gpu_efl_sources
-    sources -= external_exclude_gpu_efl_sources
-  }
-
   if (is_fuchsia) {
     sources += [ "gpu_info_collector_fuchsia.cc" ]
   }
@@ -258,6 +253,11 @@ source_set("config_sources") {
   if (use_ozone) {
     deps += [ "//ui/ozone" ]
   }
+
+  if (use_efl) {
+    sources += external_gpu_efl_sources
+    sources -= external_exclude_gpu_efl_sources
+  }
 }
 
 if (is_android) {
index c0985a9..1f7c6a3 100644 (file)
@@ -1216,15 +1216,6 @@ component("net") {
     ]
   }
 
-    if (is_linux || is_tizen) {
-      sources += [
-        "base/network_change_notifier_linux.cc",
-        "base/network_change_notifier_linux.h",
-        "proxy_resolution/proxy_config_service_linux.cc",
-        "proxy_resolution/proxy_config_service_linux.h",
-      ]
-    }
-
   if (is_mac) {
     sources += [
       "base/network_notification_thread_mac.cc",
index 2a99387..8c376c5 100644 (file)
@@ -79,12 +79,10 @@ source_set("audio") {
   ]
 
   if (is_linux || is_tizen || is_chromeos) {
-    set_sources_assignment_filter([])
     sources += [
       "audio_sandbox_hook_linux.cc",
       "audio_sandbox_hook_linux.h",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
     public_deps += [
       "//sandbox/linux:sandbox_services",
       "//sandbox/policy",
index ea11786..479769c 100644 (file)
@@ -130,7 +130,6 @@ source_set("generic_sensor") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "linux/sensor_data_linux.cc",
       "linux/sensor_data_linux.h",
@@ -143,7 +142,6 @@ source_set("generic_sensor") {
       "platform_sensor_reader_linux.cc",
       "platform_sensor_reader_linux.h",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_win) {
index 26f7043..f3f83ac 100644 (file)
@@ -46,13 +46,11 @@ source_set("hid") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [
       "hid_connection_linux.cc",
       "hid_service_linux.cc",
       "input_service_linux.cc",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_chromeos_ash) {
index 34bb981..f6e6c1e 100644 (file)
@@ -106,12 +106,10 @@ if (is_win || ((is_linux || is_tizen || is_chromeos) && use_udev) || is_mac) {
     }
 
     if (is_tizen) {
-      set_sources_assignment_filter([])
       sources += [
         "serial_device_enumerator_linux.cc",
         "serial_device_enumerator_linux.h",
       ]
-      set_sources_assignment_filter(sources_assignment_filter)
     }
   }
 
index 361f6ef..886a799 100644 (file)
@@ -59,9 +59,7 @@ source_set("time_zone_monitor") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [ "time_zone_monitor_linux.cc" ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 }
 
index 5597f45..c8ba4b5 100644 (file)
@@ -104,12 +104,10 @@ static_library("usb") {
   }
 
   if (is_tizen && use_udev) {
-    set_sources_assignment_filter([])
     sources += [
       "usb_device_linux.cc",
       "usb_service_linux.cc",
     ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_android) {
index 5f15074..588a827 100644 (file)
@@ -205,9 +205,7 @@ component("network_service") {
   }
 
   if (is_tizen) {
-    set_sources_assignment_filter([])
     sources += [ "network_sandbox_hook_linux.cc" ]
-    set_sources_assignment_filter(sources_assignment_filter)
   }
 
   if (is_chromeos_ash) {
index 1ecc4f6..b4db3b3 100644 (file)
@@ -50,18 +50,6 @@ def init(root_src_dir, enable_style_format=True):
     _gn_command_path = os.path.join(buildtools_platform_dir,
                                     "gn{}".format(exe_suffix))
 
-    # //tizen_src/buildtools for tizen platform
-    f = open(root_src_dir + "/target.txt", 'r')
-    str = f.read().strip()
-    if (str == "tizen"):
-        tizenbuildtools_dir = os.path.join(root_src_dir + "/tizen_src",
-                                           "buildtools")
-        _clang_format_command_path = os.path.join(
-            tizenbuildtools_dir, "clang-format{}".format(exe_suffix))
-        _gn_command_path = os.path.join(tizenbuildtools_dir,
-                                        "gn{}".format(exe_suffix))
-
-
 def auto_format(contents, filename):
     assert isinstance(filename, str)
 
index 2bcaabc..e9343dc 100644 (file)
@@ -13,6 +13,10 @@ buildconfig = "//build/config/BUILDCONFIG.gn"
 # in the source tree, e.g. for third party source trees.
 secondary_source = "//build/secondary/"
 
+# 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.
 #
@@ -34,28 +38,11 @@ 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 = [
-    # Dependencies used by the extra libraries. Putting them here causes them
-    # to be executed first during snapshot creation.
-    "//third_party/blink/renderer/core/streams/CommonOperations.js",
-    "//third_party/blink/renderer/core/streams/CommonStrings.js",
-    "//third_party/blink/renderer/core/streams/SimpleQueue.js",
-
-    # Extra libraries.
-    "//third_party/blink/renderer/core/streams/ByteLengthQueuingStrategy.js",
-    "//third_party/blink/renderer/core/streams/CountQueuingStrategy.js",
-    "//third_party/blink/renderer/core/streams/ReadableStream.js",
-    "//third_party/blink/renderer/core/streams/WritableStream.js",
-    "//third_party/blink/renderer/core/streams/TransformStream.js",
-  ]
+  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
 
@@ -67,122 +54,38 @@ default_args = {
   # Changes some setup for the Crashpad build to set them to build against
   # Chromium's zlib, base, etc.
   crashpad_dependencies = "chromium"
+
+  # 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"
 }
 
-# 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
+# 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".
-check_targets = [
-  #"//apps/*",  # Medium-hard.
-  "//ash/*",
-  "//base/*",
-  "//blink/*",
-  "//build/*",
-  "//cc/*",
-
-  #"//chrome/*",  # Epic number of errors.
-  "//chrome/app/*",
-  "//chrome/app_shim/*",
-  "//chrome/browser/chromeos/*",
-  "//chrome/browser/extensions/*",
-  "//chrome/browser/ui/*",
-  "//chrome/common/*",
-  "//chrome/installer/*",
-  "//chrome/profiling",
-  "//chrome/third_party/mozilla_security_manager/*",
-  "//chrome/tools/*",
-  "//chrome/utility/*",
-  "//chromecast/*",
-  "//chromeos/*",
-  "//chrome_elf/*",
-  "//cloud_print/*",
-  "//components/*",
-  "//content/*",
-  "//courgette/*",
-  "//crypto/*",
-  "//data/*",
-  "//dbus/*",
-  "//device/*",
-
-  #"//extensions/*",  # Lots of errors.
-  "//extensions:extensions_unittests",
-  "//extensions/browser:browser_tests",
-  "//extensions/browser:unit_tests",
-  "//extensions/browser/install:*",
-  "//extensions/common:common",
-  "//extensions/common:unit_tests",
-  "//extensions/renderer:unit_tests",
-  "//extensions/shell/*",
-  "//gin/*",
-  "//google_apis/*",
-  "//google_update/*",
-  "//gpu/*",
-
-  "//ios/*",
-  "//ios_internal/*",
-  "//ipc/*",
-
-  #"//jingle/*",
-  "//mash/*",
-
-  "//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/breakpad/*",  # Small errors.
-  "//third_party/brotli/*",
-  "//third_party/hunspell/*",
-  "//third_party/leveldatabase/*",
-
-  #"//third_party/libaddressinput/*",  # Small errors.
-  "//third_party/libphonenumber/*",
-
-  #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
-  "//third_party/snappy/*",
-
-  #"//third_party/WebKit/*",  # Errors: https://crbug.com/800764
-  #"//third_party/webrtc/*",  # Errors: https://crbug.com/824831
-  "//third_party/webrtc_overrides/*",
-  "//tools/*",
-
-  "//ui/*",
-  "//url/*",
-
-  #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
-  "//webrunner/*",
+no_check_targets = [
+  "//extensions:*",  # 28 errors
+  "//headless:*",  # 107 errors
+
+  "//third_party/icu/*",
+  "//third_party/libwebp:*",  # 7 errors, https://crbug.com/800762
+
+  # //v8, https://crbug.com/v8/7330
+  "//v8/src/inspector:inspector",  # 20 errors
+  "//v8/test/cctest:cctest_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
 # to force additional review for new uses of exec_script, which is strongly
 # discouraged.
 #
-# GYPI_TO_GN
-#
-# Some of these entries are for legacy gypi_to_gn calls. We should not be
-# adding new calls to this script in the build (see //build/gypi_to_gn.py for
-# detailed advice). The only time you should be editing this list for
-# gypi_to_gn purposes is when moving an existing call to a different place.
-#
 # PLEASE READ
 #
 # You should almost never need to add new exec_script calls. exec_script is
@@ -192,7 +95,7 @@ check_targets = [
 # additions, we keep the build fast and clean. If you think you need to add a
 # new call, please consider:
 #
-# - Do not use a script to check for the existance of a file or directory to
+# - Do not use a script to check for the existence of a file or directory to
 #   enable a different mode. Instead, use GN build args to enable or disable
 #   functionality and set options. An example is checking for a file in the
 #   src-internal repo to see if the corresponding src-internal feature should
@@ -244,22 +147,20 @@ exec_script_whitelist =
       # in the Chromium repo outside of //build.
       "//build_overrides/build.gni",
 
+      "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn",
+
       # TODO(dgn): Layer violation but breaks the build otherwise, see
       # https://crbug.com/474506.
       "//clank/java/BUILD.gn",
       "//clank/native/BUILD.gn",
 
+      "//google_apis/BUILD.gn",
+      "//printing/BUILD.gn",
+
       "//remoting/host/installer/linux/BUILD.gn",
       "//remoting/remoting_version.gni",
       "//remoting/host/installer/win/generate_clsids.gni",
 
-      # TODO(dpranke): Get these from the appropriate repos instead.
-      "//third_party/catapult/tracing/BUILD.gn",
-      "//third_party/google_input_tools/inputview.gni",
-
       "//tools/grit/grit_rule.gni",
-
-      # Not gypi-to-gn.
-      "//google_apis/BUILD.gn",
-      "//printing/BUILD.gn",
+      "//tools/gritsettings/BUILD.gn",
     ]
index d54a605..5268b95 100644 (file)
@@ -10,9 +10,11 @@ declare_args() {
   use_wayland = false
 
   gcc_ver = ""
-  python_ver = "2.5"  # no use of this variable, if removing then revome from gn_chromiumefl.sh also
+  python_ver = "2.5"  # no use of this variable, if removing then revome from
+                      # gn_chromiumefl.sh also
 
-  depth = ""  # no use of this variable, if removing then revome from gn_chromiumefl.sh also
+  depth = ""  # no use of this variable, if removing then revome from
+              # gn_chromiumefl.sh also
   outdir = ""
 
   lto_level = ""
@@ -71,7 +73,3 @@ if (use_ozone) {
   #use_glib = true
   external_ozone_platforms = [ "efl" ]
 }
-
-treat_warnings_as_errors = werror
-
-use_x11 = false
index 7e073b4..d93f966 100755 (executable)
@@ -111,7 +111,6 @@ COMMON_GN_PARAMETERS="use_libjpeg_turbo=true
                       use_ozone=true
                       ozone_auto_platforms=false
                       ozone_platform_wayland=false
-                      is_desktop_linux=false
                       use_pango=false
                       use_cairo=false
                       enable_plugins=true
index 268f51f..3cbc6d4 100644 (file)
@@ -72,7 +72,7 @@ external_ui_gfx_sources = [
 # For //ui/gfx/x target
 external_ui_gfx_x11_sources =
     [ "//tizen_src/chromium_impl/ui/gfx/x/x11_types_override.cc" ]
-external_exclude_ui_gfx_x11_sources = [ "x11_types.cc" ]
+external_exclude_ui_gfx_x11_sources = []
 if (wayland_bringup) {
   external_exclude_ui_gfx_x11_sources += [ "gfx/x11_types_override.cc" ]
 }
index 68cfc7f..197bbb5 100644 (file)
@@ -78,7 +78,6 @@ shared_library("chromium-ewk") {
     "//services/device:lib",
     "//skia",
     "//storage/browser",
-    "//third_party/blink/renderer/platform/wtf",
     "//third_party/leveldatabase",
     "//third_party/sqlite",
     "//tizen_src/chromium_impl/efl:efl-init",
index 53672ac..21802fc 100644 (file)
@@ -129,7 +129,7 @@ source_set("unittests") {
     }
   }
 
-  if (use_ozone) {
+  if (use_ozone && !use_efl) {
     sources += [ "ozone/bitmap_cursor_factory_ozone_unittest.cc" ]
     deps += [
       ":cursor",