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

Fix for linking to unbuilt C/C++ objects #85

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

dinkelk
Copy link
Collaborator

@dinkelk dinkelk commented Oct 16, 2024

Linking to C/C++ would fail when only a portion of the C/C++ source files in a directory are dependencies of the currently compiling binary. Only some of the files would be compiled into objects, but GPRBuild (by default) tries to link to all C/C++ objects found in a directory in the Source_Dirs. To work around this, at link time, we now pass a list of files to exclude from the build, which includes C/C++ files that exist in the Source_Dirs, but are not dependencies of the currently compiling binary.

dinkelk added a commit to dinkelk/adamant_example that referenced this pull request Oct 17, 2024
This enables the fix in lasp/adamant#85 for this repository.
Linking to C/C++ would fail when only a portion of the C/C++ source
files in a directory are dependencies of the currently compiling binary.
Only some of the files would be compiled into objects, but GPRBuild (by
default) tries to link to all C/C++ objects found in a directory in the
Source_Dirs. To work around this, at link time, we now pass a list of
files to exclude from the build, which includes C/C++ files that exist
in the Source_Dirs, but are not dependencies of the currently compiling
binary.
@dinkelk dinkelk merged commit d41ed7b into lasp:main Oct 17, 2024
4 checks passed
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 17, 2024
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 17, 2024
dinkelk added a commit that referenced this pull request Oct 17, 2024
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 17, 2024
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 18, 2024
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 18, 2024
dinkelk added a commit to dinkelk/adamant that referenced this pull request Oct 18, 2024
dinkelk added a commit that referenced this pull request Oct 18, 2024
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.

1 participant