-
Notifications
You must be signed in to change notification settings - Fork 51
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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 |
There was a problem hiding this comment.
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), |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
getObjectFileExtension()
instead ofo
.
That would then fail on Windows, as that hard-coded uses ".obj" in Substrate.
There was a problem hiding this comment.
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.
Fix for #715