Skip to content

Conversation

@johanvos
Copy link
Contributor

Fix for #715

@johanvos johanvos requested a review from jperedadnr July 28, 2020 08:31
* Loops over every jar on the classpath that isn't a JavaFX jar and checks
* if it contains native static libraries (*.a or *.lib files). If found, the
* libraries are extracted into a temporary folder for use in the link step.
* if it contains native static libraries (*.a or *.lib files) or object files. If found, the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or object files (*.o).

for (String jar : jars) {
FileOps.extractFilesFromJar("." + getStaticLibraryFileExtension(), Path.of(jar),
libPath, getTargetSpecificNativeLibsFilter());
FileOps.extractFilesFromJar(".o" , Path.of(jar),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getObjectFileExtension() instead of o.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract Path.of(jar) and getTargetSpecificNativeLibsFilter() to variables, as they are used twice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use getObjectFileExtension() instead of o.

That would then fail on Windows, as that hard-coded uses ".obj" in Substrate.

Copy link
Contributor

@jperedadnr jperedadnr Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that #718 has been integrated, this can be refactored to include all possible file extensions, creating a list before the for with them.

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