Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

build: fix ./configure --xcode failure #376

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@
'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings
'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics
'PREBINDING': 'NO', # No -Wl,-prebind
'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min=10.7
'MACOSX_DEPLOYMENT_TARGET': '10.9', # -mmacosx-version-min=10.9
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
Expand Down
4 changes: 4 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1472,8 +1472,11 @@ write('config.mk', do_not_edit + config)

gyp_args = ['--no-parallel']

chakracore_dir_absolute = os.path.realpath(os.path.dirname(__file__) + '/deps/chakrashim/core')

if options.use_xcode:
gyp_args += ['-f', 'xcode']
chakracore_dir_absolute = '$(PROJECT_DIR)/core'
elif options.use_ninja:
gyp_args += ['-f', 'ninja']
elif flavor == 'win' and sys.platform != 'msys':
Expand All @@ -1485,6 +1488,7 @@ if options.compile_commands_json:
gyp_args += ['-f', 'compile_commands_json']

gyp_args += args
gyp_args += ['-Dchakracore_dir_absolute=' + chakracore_dir_absolute]

if warn.warned:
warn('warnings were emitted in the configure phase')
Expand Down
32 changes: 21 additions & 11 deletions deps/chakrashim/chakracore.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
'linker_start_group%': '',
'linker_end_group%': '',
'chakra_libs_absolute%': '',
'chakracore_dir_absolute%': '',

# xplat (non-win32) only
'chakra_config': '<(chakracore_build_config)', # Debug, Release, Test
Expand Down Expand Up @@ -61,7 +62,8 @@
'chakracore_win_bin_dir':
'<(chakra_dir)/build/vcbuild/bin/<(Platform)_<(chakracore_build_config)',
'xplat_dir': '<(chakra_dir)/out/<(chakra_config)',
'chakra_libs_absolute': '<(PRODUCT_DIR)/../../deps/chakrashim/<(xplat_dir)',
'chakra_libs_absolute': '<(chakracore_dir_absolute)/out/<(chakra_config)',
#'<(PRODUCT_DIR)/../../deps/chakrashim/<(xplat_dir)',

'conditions': [
['OS=="win"', {
Expand Down Expand Up @@ -147,20 +149,28 @@
'library_dirs': [ '<(PRODUCT_DIR)' ],
'conditions': [
['OS=="win"', {
}, {
'conditions': [
['OS=="mac"', {
'libraries': [
'-framework CoreFoundation',
'-framework Security',
]
}]
},
'OS=="mac"', {
'libraries': [
# '-Wl,-undefined,error',
'$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
'$(SDKROOT)/System/Library/Frameworks/Security.framework',
# '<@(linker_start_group)',
'<(PRODUCT_DIR)/libChakraCoreStatic.a'
# '<@(linker_end_group)', # gpy fails to patch with list
],
'xcode_settings': {
'OTHER_LDFLAGS': [
'-framework CoreFoundation',
'-framework Security',
],
},
}, {
'libraries': [
'-Wl,-undefined,error',
'<@(linker_start_group)',
'<(chakra_libs_absolute)/lib/libChakraCoreStatic.a ' # keep this single space.
'<@(linker_end_group)', # gpy fails to patch with list
'<(PRODUCT_DIR)/libChakraCoreStatic.a ' # keep this single space.
'<@(linker_end_group)', # gpy fails to patch with list
],
}],
],
Expand Down