Skip to content
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

cross-platform: ChakraCore on OSX #1134

Merged
merged 1 commit into from
Jun 18, 2016
Merged

cross-platform: ChakraCore on OSX #1134

merged 1 commit into from
Jun 18, 2016

Conversation

obastemur
Copy link
Collaborator

Disclaimer: Currently, ChakraCore is not officially supported on OSX.

This PR targets the individuals interested with experimenting ChakraCore on
OSX. After seeing #1131, spent couple of hours to fix the compile, and link
time issues on OSX target.

Steps to compile :

brew install icu4c
./build.sh --debug -j:2 --icu=/usr/local/Cellar/icu4c/54.1/include/

Status:
CMAKE has an issue with shared bundles on OSX (a.k.a. so) and currently CH does not
play well with dylib.

@tadeuzagallo
Copy link
Contributor

Thanks for jumping into it so quickly. I tested it locally and I saw it already compiles, that's great. Let me know if there's anything I can help with. I'd also be more than happy to start looking into iOS after that.


# By default, don't export any symbols from this library
# We'll manually export the relevant individual functions
set_target_properties(ChakraCore PROPERTIES CXX_VISIBILITY_PRESET hidden)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removed intentionally even on Linux, the comments not true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a false setting..So, it doesn't affect statically inherited libraries, hence linker gives warnings.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide some more context here please? If we wanted a dynamic library on Linux, is that still not needed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This SO inherits other static libraries with visibility=default and expect to be a proxy. If we want a particular interface is hidden, this is not the place in our case.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line then be moved to the root CMakeLists.txt if that's the behavior we want?

Copy link
Collaborator Author

@obastemur obastemur Jun 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See fvisibility=hidden under root/CMakeLists.txt

@obastemur
Copy link
Collaborator Author

PR is updated. @tadeuzagallo @jianchun @digitalinfinity Thanks for the reviews so far.

COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CHAKRACORE_BINARY_DIR}/bin/ChakraCore/libChakraCore.so"
${CHAKRACORE_BINARY_DIR}/)
elseif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing is that its a little hard to read what the difference is between OSX and Linux- can we take this list, assign it to a CMakeList variable and then append just the diffs in the OSX/Linux cases (and then assign the customized list to target_link_libraries). If not, a comment on what the differences are in this particular case between OSX and Linux would make this easier to read in the future.

@obastemur
Copy link
Collaborator Author

Hmm. CI is down I guess?

Disclaimer: Currently, ChakraCore is not officially supported on OSX.

This PR targets the individuals interested with experimenting ChakraCore on
OSX. After seeing #1131, spent couple of hours to fix the compile, and
link time issues on OSX target.

Steps to compile :

```
brew install icu4c
./build.sh --debug -j:2 --icu=/usr/local/Cellar/icu4c/54.1/include/
```

Status:
CMAKE has an issue with OSX shared bundles and currently CH does not
play well with dylib output.
@chakrabot chakrabot merged commit 807ed43 into chakra-core:linux Jun 18, 2016
chakrabot pushed a commit that referenced this pull request Jun 18, 2016
Merge pull request #1134 from obastemur:osx_support
Disclaimer: Currently, ChakraCore is not officially supported on OSX.

This PR targets the individuals interested with experimenting ChakraCore on
OSX. After seeing #1131, spent couple of hours to fix the compile, and link
time issues on OSX target.

Steps to compile :
```
brew install icu4c
./build.sh --debug -j:2 --icu=/usr/local/Cellar/icu4c/54.1/include/
```

Status:
CMAKE has an issue with shared bundles on OSX (a.k.a. so) and currently CH does not
play well with dylib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants