Skip to content

Commit be8ca4f

Browse files
committed
Fix use of compiler command in linker script.
1 parent d690fc3 commit be8ca4f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/cext/linker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def self.compile_if_needed(files)
7676
files.map do |file|
7777
if file.end_with?('.c')
7878
objfile = "#{File.dirname(file)}/#{File.basename(file, '.*')}.#{RbConfig::CONFIG['OBJEXT']}"
79-
compile = RbConfig::CONFIG['COMPILE_C'].gsub('$<', file).gsub('$@', objfile)
79+
compile = RbConfig::CONFIG['TRUFFLE_RAW_COMPILE_C'].gsub('$<', file).gsub('$@', objfile)
8080
compile = compile.sub('$(INCFLAGS)', @incflags.join(' '))
8181
compile = compile.sub('$(COUTFLAG)', '')
8282
if system(compile)

lib/truffle/rbconfig-for-mkmf.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@
147147
cxx_flags = "$(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG) -xc++"
148148
opt_command = "#{opt} #{opt_passes} $@ -o $@"
149149

150+
mkconfig["TRUFFLE_RAW_COMPILE_C"] = for_file.call("$(CC)", c_flags, opt_command)
150151
mkconfig['COMPILE_C'] = with_conditional_preprocessing.call(
151152
for_pipe.call("$(CC)", c_flags, opt_command),
152153
for_file.call("$(CC)", c_flags, opt_command))

0 commit comments

Comments
 (0)