diff --git a/src/parser.py b/src/parser.py index f26872e..2b971c5 100644 --- a/src/parser.py +++ b/src/parser.py @@ -17,7 +17,7 @@ StorageClass, TranslationUnit, TypeKind, - + Config, ) from .model import * @@ -97,6 +97,9 @@ def output_all(self, out): self._output_module(self.root_module, out) def parse(self, filenames, flags): + # flags will have an item like -L=libclang_path + Lindex = [i for i, x in enumerate(flags) if x.startswith('-L=')] + Config.set_library_path(flags[Lindex].split('=')[1]) abs_filenames = [os.path.abspath(f) for f in filenames] self.filenames.update(abs_filenames) diff --git a/src/robloxpy.py b/src/robloxpy.py index 64c332b..732eb5f 100644 --- a/src/robloxpy.py +++ b/src/robloxpy.py @@ -290,6 +290,8 @@ def incli(): '-std=%s' % getconfig("c", "std") ] + [ '-stdlib=%s' % getconfig("c", "stdlib") + ] + [ + '-L=%s' % getconfig("c", "dynamiclibpath") ] )