Fix problem with missing target.txt for x86_64 build 18/307518/2
authorAleksander Świniarski <a.swiniarski@samsung.com>
Mon, 11 Mar 2024 14:30:56 +0000 (15:30 +0100)
committerDae-Hyun Ko <dhyuna.ko@samsung.com>
Mon, 11 Mar 2024 23:43:50 +0000 (23:43 +0000)
Commit fixes patch apparent in the x86_64 build. In
style_format.py we are trying to obtain the target from the
target.txt. For the x86_64 target.txt it is not created to
use statically linked nodejs.

Now in the style_format.py we will assume default target as
tizen. If we will found the target.txt file, then we will
read the target from it.

Change-Id: I48a99c3368e71b0c35f0846cb0f74ad2a11fee67
Signed-off-by: Aleksander Świniarski <a.swiniarski@samsung.com>
third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py

index a6ef517..887a713 100644 (file)
@@ -51,8 +51,11 @@ def init(root_src_dir, enable_style_format=True):
                                     "gn{}".format(exe_suffix))
 
     # //tizen_src/buildtools for tizen platform
-    target = open(root_src_dir + "/target.txt", 'r')
-    target_type = target.read().strip()
+    target_type = 'tizen'
+    if os.path.exists(root_src_dir + "/target.txt"):
+        target = open(root_src_dir + "/target.txt", 'r')
+        target_type = target.read().strip()
+
     if (target_type == "tizen"):
         host_arch = open(root_src_dir + "/host_arch.txt", 'r')
         host_arch_type = host_arch.read().strip()