File tree Expand file tree Collapse file tree 6 files changed +11
-17
lines changed Expand file tree Collapse file tree 6 files changed +11
-17
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,6 @@ extern "C" {
20
20
21
21
#define TRUFFLERUBY
22
22
23
- #ifdef SULONG_TRUFFLE_H
24
- #include SULONG_TRUFFLE_H
25
- #else
26
- #include <sulong/truffle.h>
27
- #endif
28
-
29
23
#ifdef SULONG_POLYGLOT_H
30
24
#include SULONG_POLYGLOT_H
31
25
#else
Original file line number Diff line number Diff line change 97
97
98
98
relative_debug_paths = "-fdebug-prefix-map=#{ ruby_home } =."
99
99
polyglot_h = "-DSULONG_POLYGLOT_H='\" #{ ENV . fetch ( 'SULONG_POLYGLOT_H' ) } \" '"
100
- truffle_h = "-DSULONG_TRUFFLE_H='\" #{ ENV . fetch ( 'SULONG_TRUFFLE_H' ) } \" '"
101
- mkconfig [ 'CPPFLAGS' ] = "#{ relative_debug_paths } #{ polyglot_h } #{ truffle_h } "
100
+ mkconfig [ 'CPPFLAGS' ] = "#{ relative_debug_paths } #{ polyglot_h } "
102
101
expanded [ 'CPPFLAGS' ] = mkconfig [ 'CPPFLAGS' ]
103
102
104
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
261
260
],
262
261
"buildEnv" : {
263
262
"NFI_HEADERS_DIR" : "<path:truffle:TRUFFLE_NFI_NATIVE>/include" ,
264
263
"SULONG_HEADERS_DIR" : "<path:SULONG_HOME>/include" ,
265
264
"SULONG_POLYGLOT_H" : "<path:SULONG_HOME>/include/polyglot.h" ,
266
- "SULONG_TRUFFLE_H" : "<path:SULONG_LEGACY>/include/truffle.h" ,
267
- "SULONG_TRUFFLE_DIR" : "<path:SULONG_LEGACY>/include" ,
268
265
},
269
266
"output" : "." ,
270
267
"results" : [
425
422
"file:lib/cext/include/*.h" ,
426
423
],
427
424
"lib/cext/include/sulong/" : [
428
- "extracted-dependency:sulong:SULONG_LEGACY/include/truffle.h" ,
429
425
"link:../../sulong-libs/include/polyglot.h" ,
430
426
],
431
427
"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 := $(SULONG_TRUFFLE_H ) $( SULONG_POLYGLOT_H )
20
+ SULONG_HEADERS := $(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_TRUFFLE_DIR ) -I $( SULONG_HEADERS_DIR ) $<
63
+ $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -I$(ROOT ) /lib/cext/include -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_TRUFFLE_H= \" $( SULONG_TRUFFLE_H ) \" - DSULONG_POLYGLOT_H=\" $(SULONG_POLYGLOT_H ) \" -I$(ROOT ) /lib/cext/include cext/ruby.c
67
+ $(CC ) -o $@ -c $(CFLAGS ) $(LDFLAGS ) -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 @@ -2904,6 +2904,9 @@ void* rb_tr_new_managed_struct_internal(void *type) {
2904
2904
return polyglot_invoke (RUBY_CEXT , "rb_tr_new_managed_struct" , type );
2905
2905
}
2906
2906
2907
+ // Deprecated truffle LLVM intrinsic only used internally here
2908
+ void truffle_load_library (const char * string );
2909
+
2907
2910
void rb_tr_load_library (VALUE library ) {
2908
2911
truffle_load_library (RSTRING_PTR (library ));
2909
2912
}
Original file line number Diff line number Diff line change 25
25
break if line . start_with? ( '#ifdef DOXYGEN' )
26
26
next if line . start_with? ( '//' ) || line . start_with? ( ' *' )
27
27
28
- match = /^(\S .+?)\b (truffle| polyglot|__polyglot)(.+)\) (?=;)/ . match ( line )
28
+ match = /^(\S .+?)\b (polyglot|__polyglot)(.+)\) (?=;)/ . match ( line )
29
29
if match
30
30
signature , return_type = match [ 0 ] , match [ 1 ]
31
31
return_value = types . fetch ( return_type . gsub ( ' ' , '' ) , '0' )
32
32
methods << [ signature , return_value ]
33
33
end
34
34
end
35
35
36
+ methods << [ 'void truffle_load_library(const char *string)' , nil ]
37
+
36
38
File . write ( 'src/main/c/sulongmock/sulongmock.c' , ERB . new ( <<TRC ) . result )
37
39
/*
38
40
* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. This
49
51
50
52
#include <stdio.h>
51
53
#include <stdint.h>
52
- #include <truffle .h>
54
+ #include <stdlib .h>
53
55
#include <polyglot.h>
54
56
55
57
void rb_tr_mock() {
You can’t perform that action at this time.
0 commit comments