-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix issue 1811 #2123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Fix issue 1811 #2123
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
68beb62
cmake: add ChakraAutoConfigure.cmake
kphillisjr f956ed2
CMake: Do not expose ChakraCore linker dependencies.
kphillisjr 7d49290
cmake: add Copyright header to ChakraAutoConfigure.cmake
kphillisjr 75182f3
jsrt: Fix shared library runtime on OSX/Linux.
kphillisjr fe3dcfe
xplat: make DynamicProfileStorage::Initialize re-entrant
kphillisjr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
#------------------------------------------------------------------------------------------------------- | ||
# Copyright (C) Microsoft. All rights reserved. | ||
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
#---------------------------------------------------------------------------------------------------- | ||
|
||
# Simple Macro that Autoconfigures ChakraCore | ||
MACRO(CHAKRACORE_AUTOCONFIGURE) | ||
#------------------------------- | ||
# BEGIN CPU Autodetection | ||
#------------------------------- | ||
|
||
# Clear up variables that get Modified by this Macro. | ||
unset(CC_TARGETS_X86_SH CACHE) | ||
unset(CC_TARGETS_AMD64_SH CACHE) | ||
unset(CC_TARGETS_X86 CACHE) | ||
unset(CC_TARGETS_AMD64 CACHE) | ||
|
||
# Configure CPU Architecture. | ||
# Currently only x86 and AMD64 are all that are autocnfigured. | ||
if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64|amd64|AMD64") | ||
set(CC_TARGETS_AMD64 1) | ||
message(STATUS "ChakraCore: Building 64-bit x86 code (AMD64)") | ||
elseif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i[3-6]86.*|x86.*") | ||
set(CC_TARGETS_X86 1) | ||
set(CMAKE_SYSTEM_PROCESSOR "i386") | ||
message(STATUS "ChakraCore: Building 32-bit x86 code.") | ||
else() | ||
message(FATAL_ERROR "ChakraCore: Autodetection for ${CMAKE_SYSTEM_PROCESSOR} not supported.") | ||
endif() | ||
|
||
#------------------------------- | ||
# END CPU Autodetection | ||
#------------------------------- | ||
|
||
#------------------------------- | ||
# BEGIN Autodection for International Components for Unicode ( ICU ) | ||
#------------------------------- | ||
|
||
# TODO: Ensure this works for cross-compile. | ||
|
||
# Clear all ICU Variables. | ||
unset(ICU_SETTINGS_RESET CACHE) | ||
unset(ICU_INCLUDE_PATH CACHE) | ||
unset(ICU_INCLUDE_PATH_SH CACHE) | ||
unset(NO_ICU_PATH_GIVEN_SH CACHE) | ||
unset(NO_ICU_PATH_GIVEN CACHE) | ||
unset(CC_EMBED_ICU_SH CACHE) | ||
unset(CC_AUTODETECT_ICU CACHE) | ||
unset(ICULIB CACHE) | ||
unset(ICU_CC_PATH CACHE) | ||
# Auto-Detect ICU Using pkg-config. | ||
# To Cross-compile using pkg_config use version 0.23 or newer. | ||
# Also do not forget to specify the following variables: | ||
# System Root is defined using: PKG_CONFIG_SYSROOT_DIR | ||
# pkg-config default Search path: PKG_CONFIG_LIBDIR | ||
# pkg-config additional search paths: PKG_CONFIG_PATH | ||
# NOTE: you can make PKG_CONFIG_LIBDIR and PKG_CONFIG_PATH identical. | ||
find_package(PkgConfig) | ||
if(PKG_CONFIG_FOUND) | ||
# Find ICU Common and Data files | ||
pkg_check_modules(PKGCFG_ICU_UC icu-uc) | ||
# Find ICU Internationalization Library. | ||
pkg_check_modules(PKGCFG_ICU_I18N icu-i18n) | ||
if(PKGCFG_ICU_UC_FOUND AND PKGCFG_ICU_I18N_FOUND) | ||
# This should include internationalization. | ||
set(ICU_CC_PATH "${PKGCFG_ICU_UC_INCLUDE_DIRS}") | ||
set(ICULIB "${PKGCFG_ICU_UC_LDFLAGS}") | ||
endif() | ||
endif() | ||
ENDMACRO(CHAKRACORE_AUTOCONFIGURE) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change was supposed to be an definition check against _WIN32. For xplat this function is safe to call repeatedly.