File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -34,24 +34,24 @@ also add the calls we need to generate the GIMPLE:
34
34
int main () {
35
35
gcc_jit_context *ctxt = gcc_jit_context_acquire();
36
36
create_code (ctxt, NULL);
37
- gcc_jit_context_compile_to_file (ctxt, GCC_JIT_OUTPUT_KIND_DYNAMIC_LIBRARY, "tmp" );
37
+ gcc_jit_context_dump_to_file (ctxt, "tmp.gimple", 1 );
38
38
return 0;
39
39
}
40
40
```
41
41
42
42
Then we can compile it by using:
43
43
44
44
``` console
45
- gcc const .c -I `pwd`/gcc/gcc/jit/ -L `pwd`/gcc-build/gcc -lgccjit -o out
45
+ gcc local .c -I `pwd`/gcc/gcc/jit/ -L `pwd`/gcc-build/gcc -lgccjit -o out
46
46
```
47
47
48
48
And finally when you run it:
49
49
50
50
``` console
51
- LD_LIBRARY_PATH=`pwd`/gcc-build/gcc ./out
51
+ LD_LIBRARY_PATH=`pwd`/gcc-build/gcc LIBRARY_PATH=`pwd`/gcc-build/gcc ./out
52
52
```
53
53
54
- It should display :
54
+ You should now have a file named ` tmp.gimple ` which contains :
55
55
56
56
``` c
57
57
__attribute__ ((const))
You can’t perform that action at this time.
0 commit comments