Skip to content

Commit

Permalink
Fixed GEM & PyPI packages to use SDK from Xcode when building the ext…
Browse files Browse the repository at this point in the history
…ension
  • Loading branch information
bentoi committed Jan 16, 2019
1 parent 036baa6 commit 86591db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ice/gem/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# **********************************************************************

require "mkmf"
require "rbconfig"

if RUBY_PLATFORM =~ /mswin|mingw/
puts "MinGW is not supported with Ice for Ruby."
Expand Down Expand Up @@ -32,6 +33,9 @@
#
if RUBY_PLATFORM =~ /darwin/
$ARCH_FLAG = "-arch x86_64"
# Make sure to use the SDK from Xcode (required for Sierra where old system headers can be used otherwise)
RbConfig::MAKEFILE_CONFIG['CC'] = 'xcrun -sdk macosx clang'
RbConfig::MAKEFILE_CONFIG['CXX'] = 'xcrun -sdk macosx clang++'
end

$INCFLAGS << ' -Iice/cpp/include'
Expand Down
3 changes: 3 additions & 0 deletions ice/pypi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
if platform == 'darwin':
if not 'ARCHFLAGS' in os.environ:
os.environ['ARCHFLAGS'] = '-arch x86_64'
# Make sure to use the SDK from Xcode (required for Sierra where old system headers can be used otherwise)
os.environ['CC'] = 'xcrun -sdk macosx clang'
os.environ['CXX'] = 'xcrun -sdk macosx clang++'
extra_compile_args.append('-w')
if use_ice:
libraries = ["IceSSL", "IceLocatorDiscovery", "IceDiscovery", "Ice"]
Expand Down

0 comments on commit 86591db

Please sign in to comment.