File tree Expand file tree Collapse file tree 3 files changed +26
-2
lines changed
src/main/java/com/adacore/lkql_jit/cli Expand file tree Collapse file tree 3 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 6767 <dependency >
6868 <groupId >com.adacore</groupId >
6969 <artifactId >liblkqllang</artifactId >
70- <version >0.1</version >
70+ <version >${config.liblkqllangVersion} </version >
71+ </dependency >
72+
73+ <dependency >
74+ <groupId >com.adacore</groupId >
75+ <artifactId >langkit_support</artifactId >
76+ <version >${config.langkit_supportVersion} </version >
7177 </dependency >
7278
7379 <dependency >
Original file line number Diff line number Diff line change 55
66package com .adacore .lkql_jit .cli ;
77
8+ import com .adacore .langkit_support .NativeTools ;
89import java .util .concurrent .Callable ;
910import picocli .CommandLine ;
1011import picocli .CommandLine .Command ;
@@ -39,6 +40,17 @@ public Integer call() throws Exception {
3940 }
4041
4142 public static void main (String [] args ) {
43+ // Start by unsetting the "LD_PRELOAD" environment variable to make
44+ // sure child processes aren't impacted by it.
45+ try {
46+ NativeTools .setenv ("LD_PRELOAD" , "" );
47+ } catch (Throwable t ) {
48+ System .err .println ("Error while calling the 'setenv' function" );
49+ t .printStackTrace ();
50+ System .exit (1 );
51+ }
52+
53+ // Then call the main processing function
4254 int rc = new CommandLine (new LKQLMain ()).execute (args );
4355 System .exit (rc );
4456 }
Original file line number Diff line number Diff line change 5858 "PATH" if os .name == "nt" else "LD_LIBRARY_PATH" , ""
5959 )
6060
61+ # Add "libjsig.so" to the LD_PRELOAD on Linux to avoid SIGILL errors
62+ env = dict (os .environ )
63+ if os .name != "nt" :
64+ env |= {"LD_PRELOAD" : P .join (graal_home , "lib" , "libjsig.so" )}
65+
6166 # Run the full Java command
6267 subprocess .run (
6368 [
102107 ['--engine.CompileImmediately=true' ]
103108 if args .compile_immediately
104109 else []
105- )
110+ ),
111+ env = env
106112 )
You can’t perform that action at this time.
0 commit comments