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

include object files into image #716

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

johanvos
Copy link
Contributor

Fix for #715

@johanvos johanvos requested a review from jperedadnr July 28, 2020 08:31
@@ -637,8 +637,8 @@ private static void writePatternEntry(BufferedWriter bw, String pattern) throws

/**
* 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).

@@ -654,6 +654,9 @@ private void extractNativeLibs(String classPath) throws IOException {
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