File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 136
136
end
137
137
138
138
for_file = proc do |compiler , flags , opt_command |
139
- "#{ compiler } #{ flags } $< && #{ opt_command } "
139
+ "#{ compiler } #{ flags } $(CSRCFLAG)$ < && #{ opt_command } "
140
140
end
141
141
142
142
for_pipe = proc do |compiler , flags , opt_command |
143
- "#{ preprocess_ruby } #{ cext_dir } /preprocess.rb $< | #{ compiler } -I$(<D) #{ flags } && #{ opt_command } "
143
+ language_flag = if ( '$(CXX)' == compiler )
144
+ '-xc++'
145
+ else
146
+ '-xc'
147
+ end
148
+
149
+ "#{ preprocess_ruby } #{ cext_dir } /preprocess.rb $< | #{ compiler } -I$(<D) #{ flags } #{ language_flag } - && #{ opt_command } "
144
150
end
145
151
146
- c_flags = '$(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -xc '
147
- cxx_flags = '$(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -xc++ '
152
+ c_flags = '$(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@'
153
+ cxx_flags = '$(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@'
148
154
opt_command = "#{ opt } #{ opt_passes } $@ -o $@"
149
155
150
156
mkconfig [ 'TRUFFLE_RAW_COMPILE_C' ] = for_file . call ( '$(CC)' , c_flags , opt_command )
You can’t perform that action at this time.
0 commit comments