Skip to content

Commit

Permalink
Hopefully fixes tests on github
Browse files Browse the repository at this point in the history
  • Loading branch information
ragusaa committed Feb 9, 2024
1 parent 3066a9e commit 947fe30
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions clambcc/clambc-compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,18 @@

SHARED_OBJ_DIR = Path(__file__).parent / '..' / 'lib'
if (SHARED_OBJ_DIR / 'libclambccommon.so').exists():
SHARED_OBJ_FILE = SHARED_OBJ_DIR / 'libclambcc.so'
#SHARED_OBJ_FILE = SHARED_OBJ_DIR / 'libclambcc.so'
FOUND_SHARED_OBJ = True

elif 'LD_LIBRARY_PATH' in os.environ:
# Use LD_LIBRARY_PATH to try to find it.
ld_library_paths = os.environ['LD_LIBRARY_PATH'].strip(' :').split(':')
for lib_path in ld_library_paths:
if (Path(lib_path) / 'libclambcc.so').exists():
SHARED_OBJ_FILE = Path(lib_path) / 'libclambcc.so'
if (Path(lib_path) / 'libclambcccommon.so').exists():
#SHARED_OBJ_FILE = Path(lib_path) / 'libclambcccommon.so'
SHARED_OBJ_DIR = Path(lib_path)
FOUND_SHARED_OBJ = True

break

VERBOSE=False
Expand Down Expand Up @@ -859,7 +861,7 @@ def main():
options.passthroughOptions = parser.getPassthrough()

if not FOUND_SHARED_OBJ:
die(f"libclambcc.so not found. See instructions for building", 2)
die(f"Shared objects not found. See instructions for building", 2)

if 0 == len(args):
dieNoInputFile()
Expand Down

0 comments on commit 947fe30

Please sign in to comment.