[M94 Dev][Tizen] Fix for compiler and linker errors 07/265707/8
authoruzair <uzair.jaleel@samsung.com>
Wed, 27 Oct 2021 09:45:22 +0000 (15:15 +0530)
committeruzair <uzair.jaleel@samsung.com>
Thu, 4 Nov 2021 09:27:57 +0000 (14:57 +0530)
Below change fixes compilation and linker errors for standard
profile.

Change-Id: I883074dbbd9ade5cc872145d5271cef22474f702
Signed-off-by: uzair <uzair.jaleel@samsung.com>
28 files changed:
components/safe_browsing/content/resources/gen_file_type_proto.py
gpu/config/BUILD.gn
gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.cc
gpu/ipc/common/gpu_memory_buffer_support.cc
gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.cc
gpu/ipc/service/gpu_memory_buffer_factory_native_pixmap.h
gpu/vulkan/vma_wrapper.h
gpu/vulkan/vulkan_device_queue.h
mojo/core/BUILD.gn
mojo/core/channel_linux.cc
net/BUILD.gn
sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
sandbox/policy/BUILD.gn
services/device/generic_sensor/BUILD.gn
services/resource_coordinator/public/cpp/memory_instrumentation/BUILD.gn
third_party/angle/BUILD.gn
third_party/angle/src/libGLESv2.gni
third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py
third_party/blink/renderer/core/layout/build.gni
third_party/devtools-frontend/src/BUILD.gn
third_party/node/node.gni
third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan_core.h
tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc
tizen_src/chromium_impl/content/common/tts_messages_efl.h
tizen_src/chromium_impl/content/common/tts_utterance_request_efl.h
ui/base/idle/BUILD.gn
ui/gfx/mojom/native_handle_types.mojom
ui/ozone/public/surface_factory_ozone.h

index c2b3daa..2404373 100755 (executable)
@@ -180,6 +180,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenerator):
       command += ['-a']
 
   def VerifyArgs(self, opts):
+    opts.type = "linux"
     if (not opts.all and opts.type not in PlatformTypes()):
       print("ERROR: Unknown platform type '%s'" % opts.type)
       self.opt_parser.print_help()
index 07f6a6f..f507479 100644 (file)
@@ -235,7 +235,7 @@ source_set("config_sources") {
     sources += [ "gpu_info_collector_mac.mm" ]
     frameworks = [ "OpenGL.framework" ]
   }
-  if (is_linux || is_chromeos) {
+  if (is_linux || is_chromeos || is_tizen) {
     sources += [ "gpu_info_collector_linux.cc" ]
   }
   if (is_linux || is_chromeos || is_mac) {
index 31515eb..e3a12f1 100644 (file)
@@ -5,7 +5,7 @@
 #include "gpu/ipc/common/gpu_memory_buffer_impl_native_pixmap.h"
 
 #if defined(OS_TIZEN)
-#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
+#include "third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h"
 #else
 #include <vulkan/vulkan.h>
 #endif
index d63d36a..565807e 100644 (file)
@@ -53,7 +53,7 @@ GpuMemoryBufferSupport::GpuMemoryBufferSupport() {
     return;
   }
 #endif
-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_CHROMEOS)) && !defined(OS_TIZEN)
   client_native_pixmap_factory_.reset(
       gfx::CreateClientNativePixmapFactoryDmabuf());
 #endif
index 0918649..24ce7c6 100644 (file)
@@ -192,7 +192,7 @@ GpuMemoryBufferFactoryNativePixmap::CreateImageForGpuMemoryBuffer(
                        std::move(handle.native_pixmap_handle));
     }
 #endif
-#if !defined(OS_FUCHSIA)
+#if !defined(OS_FUCHSIA) && !defined(OS_TIZEN)
     if (!pixmap) {
       DCHECK_EQ(surface_handle, gpu::kNullSurfaceHandle);
       pixmap = base::WrapRefCounted(new gfx::NativePixmapDmaBuf(
index e010203..3427316 100644 (file)
@@ -6,7 +6,7 @@
 #define GPU_IPC_SERVICE_GPU_MEMORY_BUFFER_FACTORY_NATIVE_PIXMAP_H_
 
 #if defined(OS_TIZEN)
-#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
+#include "third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h"
 #else
 #include <vulkan/vulkan.h>
 #endif
index 7d2dc9a..75892af 100644 (file)
@@ -6,7 +6,7 @@
 #define GPU_VULKAN_VMA_WRAPPER_H_
 
 #if defined(OS_TIZEN)
-#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
+#include "third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h"
 #else
 #include <vulkan/vulkan.h>
 #endif
index 105d82f..3e853b6 100644 (file)
@@ -6,7 +6,7 @@
 #define GPU_VULKAN_VULKAN_DEVICE_QUEUE_H_
 
 #if defined(OS_TIZEN)
-#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
+#include "third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h"
 #else
 #include <vulkan/vulkan.h>
 #endif
index ae3c1b2..7c252ff 100644 (file)
@@ -126,7 +126,7 @@ template("core_impl_source_set") {
         ]
       }
 
-      if ((is_linux || is_chromeos || is_android) && !is_nacl) {
+      if ((is_linux || is_chromeos || is_android || is_tizen) && !is_nacl) {
         sources += [
           "channel_linux.cc",
           "channel_linux.h",
index 59b2280..c242dcc 100644 (file)
@@ -10,7 +10,9 @@
 #include <linux/fcntl.h>
 #endif
 #include <linux/futex.h>
+#if !defined(EWK_BRINGUP)  // FIXME: m94 bringup
 #include <linux/memfd.h>
+#endif
 #include <sys/eventfd.h>
 #include <sys/mman.h>
 #include <sys/syscall.h>
 #include "base/android/build_info.h"
 #endif
 
+#if defined(EWK_BRINGUP)  // FIXME: m94 bringup
+#if defined(OS_TIZEN)
+#define F_LINUX_SPECIFIC_BASE 1024
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#define F_SEAL_SEAL 0x0001
+#define F_SEAL_SHRINK 0x0002
+#define F_SEAL_GROW 0x0004
+#define __NR_memfd_create (__NR_SYSCALL_BASE + 385)
+#endif
+#define MFD_CLOEXEC 0x0001U
+#define MFD_ALLOW_SEALING 0x0002U
+#endif
+
 #ifndef EFD_ZERO_ON_WAKE
 #define EFD_ZERO_ON_WAKE O_NOFOLLOW
 #endif
index 1f7c6a3..37ccd19 100644 (file)
@@ -1197,7 +1197,7 @@ component("net") {
     ]
   }
 
-  if (is_linux || is_chromeos_lacros) {
+  if (is_linux || is_chromeos_lacros || is_tizen) {
     sources += [
       "base/network_change_notifier_linux.cc",
       "base/network_change_notifier_linux.h",
@@ -1206,7 +1206,7 @@ component("net") {
     ]
   }
 
-  if (is_linux || is_chromeos || is_android) {
+  if (is_linux || is_chromeos || is_android || is_tizen) {
     sources += [
       "base/address_tracker_linux.cc",
       "base/address_tracker_linux.h",
index 05814c9..73d2934 100644 (file)
 #define PROT_BTI 0x10
 #endif
 
+#if defined(EWK_BRINGUP)  // FIXME: m94 bringup
+#define F_LINUX_SPECIFIC_BASE 1024
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
+#define F_SEAL_SEAL 0x0001
+#define F_SEAL_SHRINK 0x0002
+#define F_SEAL_GROW 0x0004
+#endif
+
 namespace {
 
 inline bool IsArchitectureX86_64() {
index 69828e5..37a71dc 100644 (file)
@@ -34,7 +34,7 @@ component("policy") {
     "//sandbox/policy/mojom",
   ]
   public_deps = []
-  if (is_linux || is_chromeos) {
+  if (is_linux || is_chromeos || is_tizen) {
     sources += [
       "linux/bpf_audio_policy_linux.cc",
       "linux/bpf_audio_policy_linux.h",
index 479769c..88f7e2b 100644 (file)
@@ -107,7 +107,7 @@ source_set("generic_sensor") {
       "platform_sensor_provider_linux_base.cc",
       "platform_sensor_provider_linux_base.h",
     ]
-  } else if ((is_linux || is_chromeos) && use_udev) {
+  } else if ((is_linux || is_chromeos || is_tizen) && use_udev) {
     deps += [
       "//device/base",
       "//device/udev_linux",
@@ -129,21 +129,6 @@ source_set("generic_sensor") {
     ]
   }
 
-  if (is_tizen) {
-    sources += [
-      "linux/sensor_data_linux.cc",
-      "linux/sensor_data_linux.h",
-      "linux/sensor_device_manager.cc",
-      "linux/sensor_device_manager.h",
-      "platform_sensor_linux.cc",
-      "platform_sensor_linux.h",
-      "platform_sensor_provider_linux.cc",
-      "platform_sensor_provider_linux.h",
-      "platform_sensor_reader_linux.cc",
-      "platform_sensor_reader_linux.h",
-    ]
-  }
-
   if (is_win) {
     sources += [
       "platform_sensor_provider_win.cc",
index 908dfec..9eaad7e 100644 (file)
@@ -29,7 +29,7 @@ component("memory_instrumentation") {
     sources += [ "os_metrics_win.cc" ]
   }
 
-  if (is_android || is_linux || is_chromeos) {
+  if (is_android || is_linux || is_chromeos || is_tizen) {
     sources += [ "os_metrics_linux.cc" ]
   }
 
index 7999dcf..6517fac 100644 (file)
@@ -477,7 +477,7 @@ angle_static_library("angle_gpu_info_util") {
     libs += [ "dxgi.lib" ]
   }
 
-  if (is_linux || is_chromeos) {
+  if (is_linux || is_chromeos || is_tizen) {
     sources += libangle_gpu_info_util_linux_sources
 
     if (angle_use_x11 && angle_has_build) {
index 23cab68..fc008eb 100644 (file)
@@ -77,7 +77,7 @@ xxhash_sources = [
   "src/common/third_party/xxhash/xxhash.h",
 ]
 
-if (is_linux || is_chromeos || is_android || is_fuchsia) {
+if (is_linux || is_chromeos || is_android || is_fuchsia || is_tizen) {
   libangle_common_sources += [
     "src/common/system_utils_linux.cpp",
     "src/common/system_utils_posix.cpp",
index b4db3b3..4eb5dd1 100644 (file)
@@ -50,6 +50,16 @@ 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')
+    target_str = f.read().strip()
+    if (target_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))
+
+
 def auto_format(contents, filename):
     assert isinstance(filename, str)
 
index e3a803e..e926f32 100644 (file)
@@ -746,7 +746,7 @@ if (is_win) {
   blink_core_sources_layout += [ "layout_theme_font_provider_default.cc" ]
 }
 
-if (is_linux || is_chromeos) {
+if (is_linux || is_chromeos || is_tizen) {
   blink_core_sources_layout += [
     "layout_theme_linux.cc",
     "layout_theme_linux.h",
index 75db7d5..17549e6 100644 (file)
@@ -223,7 +223,7 @@ _compressable_grd_files = filter_include(_expected_grd_files,
                                            "*.md",
                                          ])
 
-if (!is_debug) {
+if (!is_debug && !is_tizen) {
   node_action("compress") {
     script = "scripts/build/compress_files.js"
     public_deps = [ ":devtools_frontend_resources" ]
@@ -268,7 +268,7 @@ action("generate_devtools_grd") {
 
   inputs = []
 
-  if (is_debug) {
+  if (is_debug || is_tizen) {
     deps = [ ":devtools_frontend_resources" ]
     foreach(_grd_file, _expected_grd_files) {
       inputs += [ "$target_gen_dir/$_grd_file" ]
index 81c4f2c..5daabcd 100644 (file)
@@ -23,5 +23,8 @@ template("node") {
     if (is_mac) {
       inputs += [ "//third_party/node/mac/node-darwin-x64.tar.gz.sha1" ]
     }
+    if (is_tizen) {
+      inputs += [ "//third_party/node/tizen/node" ]
+    }
   }
 }
index 50e52bd..a0c09c1 100644 (file)
@@ -20,7 +20,7 @@ extern "C" {
 
 
 #define VK_VERSION_1_0 1
-#include "vulkan/vk_platform.h"
+#include "vk_platform.h"
 
 #define VK_DEFINE_HANDLE(object) typedef struct object##_T* object;
 
index eb6b87f..83ba6b9 100644 (file)
@@ -14,7 +14,9 @@
 #include "ui/display/screen.h"
 #include "ui/events/base_event_utils.h"
 #include "ui/events/event_utils.h"
+#if !defined(EWK_BRINGUP)  // FIXME: m94 bringup
 #include "ui/events/keycodes/keyboard_code_conversion_x.h"
+#endif
 #include "ui/events/keycodes/keyboard_codes.h"
 
 using namespace blink;
index 512616c..db9206c 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "content/common/tts_utterance_request_efl.h"
 #include "ipc/ipc_message_macros.h"
+#include "ipc/ipc_message_start.h"
 #include "ipc/ipc_param_traits.h"
 
 #include <vector>
index 604b13b..402e99a 100644 (file)
@@ -5,6 +5,7 @@
 #ifndef CONTENT_COMMON_TTS_UTTERANCE_REQUEST_H_
 #define CONTENT_COMMON_TTS_UTTERANCE_REQUEST_H_
 
+#include <string>
 #include <vector>
 
 namespace content {
index 0fb5f6a..022ce8f 100644 (file)
@@ -57,7 +57,7 @@ component("idle") {
     sources += [ "idle_fuchsia.cc" ]
   }
 
-  if (is_linux) {
+  if (is_linux || is_tizen) {
     sources += [ "idle_linux.cc" ]
     if (use_dbus) {
       deps += [ "//dbus" ]
index e81dd83..84645d5 100644 (file)
@@ -23,8 +23,8 @@ struct NativePixmapPlane {
 struct NativePixmapHandle {
   array<NativePixmapPlane> planes;
 
-  [EnableIf=is_linux]
   uint64 modifier;
+
   [EnableIf=is_chromeos_ash]
   uint64 modifier;
 
index f036647..871c44e 100644 (file)
@@ -10,7 +10,7 @@
 #include <vector>
 
 #if defined(OS_TIZEN)
-#include "third_party/vulkan_headers/include/vulkan/vulkan.h"
+#include "third_party/vulkan-deps/vulkan-headers/src/include/vulkan/vulkan.h"
 #else
 #include <vulkan/vulkan.h>
 #endif