diff --git a/ext/pg_query/extconf.rb b/ext/pg_query/extconf.rb index ee6936e9..87fdcb27 100644 --- a/ext/pg_query/extconf.rb +++ b/ext/pg_query/extconf.rb @@ -11,11 +11,12 @@ $INCFLAGS = "-I#{File.join(__dir__, 'include')} " + $INCFLAGS -SYMFILE = File.join(__dir__, 'pg_query_ruby.sym') if RUBY_PLATFORM =~ /darwin/ - $DLDFLAGS << " -Wl,-exported_symbols_list #{SYMFILE}" unless defined?(::Rubinius) + symfile = File.join(__dir__, 'pg_query_ruby_darwin.sym') + $DLDFLAGS << " -Wl,-exported_symbols_list #{symfile}" unless defined?(::Rubinius) else - $DLDFLAGS << " -Wl,--retain-symbols-file=#{SYMFILE}" + symfile = File.join(__dir__, 'pg_query_ruby.sym') + $DLDFLAGS << " -Wl,--retain-symbols-file=#{symfile}" end create_makefile 'pg_query/pg_query' diff --git a/ext/pg_query/pg_query_ruby_darwin.sym b/ext/pg_query/pg_query_ruby_darwin.sym new file mode 100644 index 00000000..ff9b69a6 --- /dev/null +++ b/ext/pg_query/pg_query_ruby_darwin.sym @@ -0,0 +1 @@ +_Init_pg_query