Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CHPL_LIB_PATH ignore empty strings #26074

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

ShreyasKhandekar
Copy link
Contributor

@ShreyasKhandekar ShreyasKhandekar commented Oct 10, 2024

If CHPL_LIB_PATH has colons in it, we split the path based on the colons. However, if we have a trailing or leading colon, or two colons back to back (::) in CHPL_LIB_PATH, it get's added as an empty string. This cases errors since there isn't an argument to go with -L for the target compiler.
Ex:

clang++: error: argument to '-L' is missing (expected 1 value)

This makes the change such the the addPath function ignores the empty strings in CHPL_LIB_PATH.

Will resolve nightly test failures in test-gpu-ex-cuda-12.interop.

If CHPL_LIB_PATH has colons in it, we split the path based on the
colons. However, if we have a trailing or leading colon, or two colons
back to back (`::`) in CHPL_LIB_PATH, it get's added as an empty string.
This cases errors since there isn't an argument to go with `-L` for the
target compiler.

This makes the change such the the `addPath` function ignores the empty
strings in CHPL_LIB_PATH.

Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
compiler/util/files.cpp Outdated Show resolved Hide resolved
Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
@ShreyasKhandekar ShreyasKhandekar merged commit 2f1227d into chapel-lang:main Oct 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants