File tree Expand file tree Collapse file tree 6 files changed +14
-65
lines changed Expand file tree Collapse file tree 6 files changed +14
-65
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -20,7 +20,11 @@ extern "C" {
20
20
21
21
#define TRUFFLERUBY
22
22
23
+ #ifdef SULONG_TRUFFLE_H
24
+ #include SULONG_TRUFFLE_H
25
+ #else
23
26
#include <sulong/truffle.h>
27
+ #endif
24
28
25
29
#ifdef SULONG_POLYGLOT_H
26
30
#include SULONG_POLYGLOT_H
Original file line number Diff line number Diff line change 96
96
97
97
relative_debug_paths = "-fdebug-prefix-map=#{ ruby_home } =."
98
98
polyglot_h = "-DSULONG_POLYGLOT_H='\" #{ ENV . fetch ( 'SULONG_POLYGLOT_H' ) } \" '"
99
- mkconfig [ 'CPPFLAGS' ] = "#{ relative_debug_paths } #{ polyglot_h } "
99
+ truffle_h = "-DSULONG_TRUFFLE_H='\" #{ ENV . fetch ( 'SULONG_TRUFFLE_H' ) } \" '"
100
+ mkconfig [ 'CPPFLAGS' ] = "#{ relative_debug_paths } #{ polyglot_h } #{ truffle_h } "
100
101
expanded [ 'CPPFLAGS' ] = mkconfig [ 'CPPFLAGS' ]
101
102
102
103
# Default to the ruby in $PATH to build core C extensions faster
Original file line number Diff line number Diff line change 257
257
"TRUFFLERUBY-LAUNCHER" , # We need this jar to run extconf.rb
258
258
"truffle:TRUFFLE_NFI_NATIVE" , # trufflenfi.h
259
259
"sulong:SULONG_HOME" , # polyglot.h
260
+ "sulong:SULONG_LEGACY" , # truffle.h
260
261
],
261
262
"buildEnv" : {
262
263
"TRUFFLERUBYOPT" : "--building-core-cexts" ,
263
264
"NFI_HEADERS_DIR" : "<path:truffle:TRUFFLE_NFI_NATIVE>/include" ,
264
265
"SULONG_HEADERS_DIR" : "<path:SULONG_HOME>/include" ,
265
266
"SULONG_POLYGLOT_H" : "<path:SULONG_HOME>/include/polyglot.h" ,
267
+ "SULONG_TRUFFLE_H" : "<path:SULONG_LEGACY>/include/truffle.h" ,
268
+ "SULONG_TRUFFLE_DIR" : "<path:SULONG_LEGACY>/include" ,
266
269
},
267
270
"output" : "." ,
268
271
"results" : [
415
418
"file:lib/cext/include/*.h" ,
416
419
],
417
420
"lib/cext/include/sulong/" : [
418
- "file:lib/cext/ include/sulong /truffle.h" ,
421
+ "extracted-dependency:sulong:SULONG_LEGACY/ include/truffle.h" ,
419
422
"link:../../sulong-libs/include/polyglot.h" ,
420
423
],
421
424
"lib/cext/sulong-libs/" : [
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ CFLAGS := -Wall -Werror -Wno-unused-function -fPIC -std=c99
17
17
LDFLAGS := -m64
18
18
19
19
TRUFFLE_POSIX := truffleposix/libtruffleposix.$(DLEXT )
20
- SULONG_HEADERS := $(ROOT ) /lib/cext/include/sulong/truffle.h $(SULONG_POLYGLOT_H )
20
+ SULONG_HEADERS := $(SULONG_TRUFFLE_H ) $(SULONG_POLYGLOT_H )
21
21
GENERATE_SULONG_MOCK := $(ROOT ) /tool/generate-sulongmock.rb
22
22
23
23
RUBY_HEADERS := $(wildcard $(ROOT ) /lib/cext/include/* .h) $(wildcard $(ROOT ) /lib/cext/include/* /* .h) $(wildcard $(ROOT ) /lib/cext/include/* /* /* .h)
@@ -60,11 +60,11 @@ sulongmock/sulongmock.c: $(GENERATE_SULONG_MOCK) $(SULONG_HEADERS) $(TRUFFLE_POS
60
60
$(RUBY ) $(GENERATE_SULONG_MOCK ) $(SULONG_HEADERS )
61
61
62
62
sulongmock/sulongmock.o : sulongmock/sulongmock.c
63
- $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -I$(ROOT ) /lib/cext/include -I$(SULONG_HEADERS_DIR ) $<
63
+ $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -I$(ROOT ) /lib/cext/include -I$(SULONG_TRUFFLE_DIR ) -I $( SULONG_HEADERS_DIR ) $<
64
64
65
65
# ruby.o
66
66
cext/ruby.o : cext/* .c $(RUBY_HEADERS )
67
- $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -DSULONG_POLYGLOT_H=\" $(SULONG_POLYGLOT_H ) \" -I$(ROOT ) /lib/cext/include cext/ruby.c
67
+ $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -DSULONG_TRUFFLE_H= \" $( SULONG_TRUFFLE_H ) \" - DSULONG_POLYGLOT_H=\" $(SULONG_POLYGLOT_H ) \" -I$(ROOT ) /lib/cext/include cext/ruby.c
68
68
69
69
# ruby.su
70
70
cext/Makefile : cext/extconf.rb $(BASIC_EXTCONF_DEPS )
Original file line number Diff line number Diff line change 49
49
50
50
#include <stdio.h>
51
51
#include <stdint.h>
52
- #include <sulong/ truffle.h>
52
+ #include <truffle.h>
53
53
#include <polyglot.h>
54
54
55
55
void rb_tr_mock() {
You can’t perform that action at this time.
0 commit comments