Skip to content

Commit

Permalink
Always use C++ linker
Browse files Browse the repository at this point in the history
because the system library for libjsonnet can be a static library in
some environments
  • Loading branch information
yugui committed Sep 24, 2022
1 parent e19b2ae commit a9a4899
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions ext/jsonnet/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ def target_object_files
$LIBPATH = ["#{recipe.path}/lib"] | $LIBPATH
$CPPFLAGS << " -I#{recipe.path}/include"

# jsonnet_wrap extension must be linked with c++ stdlib because
# the C++ library Rapid YAML is being statically linked.
rbconfig = RbConfig::MAKEFILE_CONFIG
if rbconfig['LDSHAREDXX']
rbconfig['LDSHARED'] = rbconfig['LDSHAREDXX']
end
end

# jsonnet_wrap extension must be linked with c++ stdlib because
# the C++ library Rapid YAML is being statically linked.
rbconfig = RbConfig::MAKEFILE_CONFIG
if rbconfig['LDSHAREDXX']
rbconfig['LDSHARED'] = rbconfig['LDSHAREDXX']
end

abort 'libjsonnet.h not found' unless have_header('libjsonnet.h')
Expand Down
2 changes: 1 addition & 1 deletion lib/jsonnet/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Jsonnet
VERSION = "0.5.1"
VERSION = "0.5.2"
end

0 comments on commit a9a4899

Please sign in to comment.