< prev index next >

src/jdk.jextract/share/classes/com/sun/tools/jextract/Context.java

Print this page

        

@@ -50,10 +50,12 @@
     final List<String> clangArgs;
     // The set of source header files
     final Set<Path>  sources;
     // The list of libraries
     final List<String> libraries;
+    // The list of library paths
+    final List<String> libraryPaths;
 
     //
     final static String defaultPkg = "jextract.dump";
     private static Context instance = new Context();
     public final Logger logger = Logger.getLogger(getClass().getPackage().getName());

@@ -62,10 +64,11 @@
         pkgMap = new HashMap<>();
         headerMap = new HashMap<>();
         clangArgs = new ArrayList<>();
         sources = new TreeSet<>();
         libraries = new ArrayList<>();
+        libraryPaths = new ArrayList<>();
     }
 
     // used only for jtreg testing
     public static Context newInstance() {
         return instance = new Context();

@@ -238,11 +241,11 @@
                 logger.info(() -> path.toString() + " seen earlier via #include");
                 return;
             }
 
             HeaderFile hf = headerMap.computeIfAbsent(path, p -> getHeaderFile(p, null));
-            hf.useLibraries(libraries);
+            hf.useLibraries(libraries, libraryPaths);
             hf.useCodeFactory(fn.apply(hf));
             logger.info(() -> "Parsing header file " + path);
 
             Index index = LibClang.createIndex();
             Cursor tuCursor = index.parse(path.toString(),
< prev index next >