Skip to content

Commit a9a4899

Browse files
committed
Always use C++ linker
because the system library for libjsonnet can be a static library in some environments
1 parent e19b2ae commit a9a4899

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

ext/jsonnet/extconf.rb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ def target_object_files
7777
$LIBPATH = ["#{recipe.path}/lib"] | $LIBPATH
7878
$CPPFLAGS << " -I#{recipe.path}/include"
7979

80-
# jsonnet_wrap extension must be linked with c++ stdlib because
81-
# the C++ library Rapid YAML is being statically linked.
82-
rbconfig = RbConfig::MAKEFILE_CONFIG
83-
if rbconfig['LDSHAREDXX']
84-
rbconfig['LDSHARED'] = rbconfig['LDSHAREDXX']
85-
end
80+
end
81+
82+
# jsonnet_wrap extension must be linked with c++ stdlib because
83+
# the C++ library Rapid YAML is being statically linked.
84+
rbconfig = RbConfig::MAKEFILE_CONFIG
85+
if rbconfig['LDSHAREDXX']
86+
rbconfig['LDSHARED'] = rbconfig['LDSHAREDXX']
8687
end
8788

8889
abort 'libjsonnet.h not found' unless have_header('libjsonnet.h')

lib/jsonnet/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Jsonnet
2-
VERSION = "0.5.1"
2+
VERSION = "0.5.2"
33
end

0 commit comments

Comments
 (0)