From 05e0f044bc7ad2510a4f22e6c0659756de229c1b Mon Sep 17 00:00:00 2001 From: Ian Halliday Date: Fri, 10 Feb 2017 10:49:30 -0800 Subject: [PATCH] chakrashim: fix xplat build Update chakracore.gyp to fix build on linux and mac. Changes from @obastemur. --- deps/chakrashim/chakracore.gyp | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/deps/chakrashim/chakracore.gyp b/deps/chakrashim/chakracore.gyp index 68d43342ab8..9ecbfa6f83e 100644 --- a/deps/chakrashim/chakracore.gyp +++ b/deps/chakrashim/chakracore.gyp @@ -54,7 +54,7 @@ 'chakracore_win_bin_dir': '<(chakra_dir)/build/vcbuild/bin/<(Platform)_$(ConfigurationName)', - 'xplat_dir': '<(chakra_dir)/BuildLinux/<(chakra_config)/lib', + 'xplat_dir': '<(chakra_dir)/out/<(chakra_config)', 'chakra_libs_absolute': '<(PRODUCT_DIR)/../../deps/chakrashim/<(xplat_dir)', 'conditions': [ @@ -69,31 +69,23 @@ ['OS in "linux android"', { 'chakracore_input': '<(chakra_dir)/build.sh', 'chakracore_binaries': [ - '<(chakra_libs_absolute)/Common/Core/libChakra.Common.Core.a', - '<(chakra_libs_absolute)/Jsrt/libChakra.Jsrt.a', - '<(chakra_libs_absolute)/../pal/src/libChakra.Pal.a', + '<(chakra_libs_absolute)/bin/ChakraCore/libChakraCoreStatic.a', ], 'linker_start_group': '-Wl,--start-group', 'linker_end_group': [ '-Wl,--end-group', - '-lgcc_s', # This must be before -lunwind! - '-lunwind', - '-lunwind-generic', + '-lgcc_s', '-licuuc', ] }], ['OS=="mac"', { 'chakracore_input': '<(chakra_dir)/build.sh', 'chakracore_binaries': [ - '<(chakra_libs_absolute)/Common/Core/libChakra.Common.Core.a', - '<(chakra_libs_absolute)/Jsrt/libChakra.Jsrt.a', - '<(chakra_libs_absolute)/../pal/src/libChakra.Pal.a', + '<(chakra_libs_absolute)/bin/ChakraCore/libChakraCoreStatic.a', ], 'icu_args': '--icu=<(icu_include_path)', 'linker_start_group': '-Wl,-force_load', 'linker_end_group': [ - '-framework CoreFoundation', - '-framework Security', '<(icu_lib_path)/libicuuc.a', '<(icu_lib_path)/libicui18n.a', '<(icu_lib_path)/libicudata.a', @@ -153,13 +145,19 @@ 'conditions': [ ['OS=="win"', { }, { + 'conditions': [ + ['OS=="mac"', { + 'libraries': [ + '-framework CoreFoundation', + '-framework Security', + ] + }] + ], 'libraries': [ '-Wl,-undefined,error', '<@(linker_start_group)', - '<(chakra_libs_absolute)/../pal/src/libChakra.Pal.a', - '<(chakra_libs_absolute)/Common/Core/libChakra.Common.Core.a', # link first for correct init order - '<(chakra_libs_absolute)/Jsrt/libChakra.Jsrt.a', - '<@(linker_end_group)', + '<(chakra_libs_absolute)/bin/ChakraCore/libChakraCoreStatic.a ' # keep this single space. + '<@(linker_end_group)', # gpy fails to patch with list ], }], ],