-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workaround for Xcode 11.4 issues
Based on the Polymake.jl patch, with a few minor tweaks. Also adds a Travis test against Xcode 11.4 to verify this works.
- Loading branch information
Showing
13 changed files
with
111 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#ifndef COEFF_RINGS_INCLUDE | ||
#define COEFF_RINGS_INCLUDE | ||
|
||
#include "includes.h" | ||
|
||
void singular_define_coeff_rings(jlcxx::Module &); | ||
|
||
#endif |
This file contains 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 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#include "jlcxx/jlcxx.hpp" | ||
#include "includes.h" | ||
#include "coeffs.h" | ||
#include "rings.h" | ||
|
This file contains 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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#include "xcode_jlcxx_workaround.h" | ||
|
||
#include <mutex> | ||
|
||
#ifdef THREADSAFE_SINGULAR | ||
|
This file contains 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,29 @@ | ||
#ifndef XCODE_JLCXX_WORKAROUND | ||
#define XCODE_JLCXX_WORKAROUND | ||
|
||
// This must be the very first include | ||
#ifdef _LIBCPP_CONFIG | ||
#error This header must be included before any system headers! | ||
#endif | ||
|
||
// Work around Xcode 11.4 issue until upstream libc++ fix arrives in Xcode: | ||
// https://github.com/llvm/llvm-project/commit/2464d8135e | ||
// | ||
// First include __config from libc++, then override typeinfo flag | ||
// to force use of address as hash instead of hashing the string. | ||
|
||
#if defined(__APPLE__) && defined(FORCE_XCODE_TYPEINFO_MERGED) | ||
#include <__config> | ||
#if defined(_LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT) && \ | ||
_LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT == 0 | ||
#undef _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT | ||
#define _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT 1 | ||
#else | ||
#error Trying to work around Xcode 11.4 bug but libc++ macro not set as expected! \ | ||
Please try rebuilding and create an issue if this reappears. | ||
#endif | ||
#endif | ||
|
||
#include "jlcxx/jlcxx.hpp" | ||
|
||
#endif |
This file contains 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,12 @@ | ||
project(xcodetypeinfo) | ||
|
||
cmake_minimum_required(VERSION 3.01) | ||
|
||
find_package(JlCxx REQUIRED) | ||
|
||
get_target_property(JlCxx_location JlCxx::cxxwrap_julia LOCATION) | ||
get_filename_component(JlCxx_location ${JlCxx_location} DIRECTORY) | ||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib;${JlCxx_location}") | ||
|
||
add_library(hello SHARED hello.cpp) | ||
target_link_libraries(hello JlCxx::cxxwrap_julia) |
This file contains 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,14 @@ | ||
#include <string> | ||
#include <vector> | ||
|
||
#include "jlcxx/jlcxx.hpp" | ||
|
||
std::string greet(const std::string& str) | ||
{ | ||
return "hello, world"; | ||
} | ||
|
||
JLCXX_MODULE define_module_hello(jlcxx::Module& mod) | ||
{ | ||
mod.method("greet", &greet); | ||
} |
5cf4afb
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.
@JuliaRegistrator register
5cf4afb
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.
Registration pull request created: JuliaRegistries/General/13966
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: