-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b64
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8081945 | emb-9 | Erik Joelsson | P4 | Resolved | Fixed | b64 |
Currently it's possible to do this:
src/$module/share/native/libfoo/foo.c
src/$module/linux/native/libfoo/foo.c
And the result will be that the most specific, linux in this case, file will get compiled and the other one ignored. The same works for custom (closed) files overriding open. In addition to native code, this also works for files being copied by the SetupJavaCompilation macro, typically properties or other resources.
For java code this does not work however and in the cases where such overrides are used, the makefiles need explicit excludes of the overridden file. I have implemented a solution for this that covers java files and cleaned files in addition to the copied files in SetupJavaCompilation, so we get consistent behavior for all sorts of sources.
src/$module/share/native/libfoo/foo.c
src/$module/linux/native/libfoo/foo.c
And the result will be that the most specific, linux in this case, file will get compiled and the other one ignored. The same works for custom (closed) files overriding open. In addition to native code, this also works for files being copied by the SetupJavaCompilation macro, typically properties or other resources.
For java code this does not work however and in the cases where such overrides are used, the makefiles need explicit excludes of the overridden file. I have implemented a solution for this that covers java files and cleaned files in addition to the copied files in SetupJavaCompilation, so we get consistent behavior for all sorts of sources.
- backported by
-
JDK-8081945 Allow custom or platform specific java source to automatically override shared source
-
- Resolved
-