RFR: 8303485: Replacing os.name for operating system customization

Mandy Chung mchung at openjdk.org
Fri Mar 10 05:13:18 UTC 2023


On Fri, 10 Mar 2023 02:51:43 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Using the naming from the build makes it clearer that there is a dependency between the build names and those in the template.
>
> Don't we have a conditional compilation ability with these template files such that we can just generate true or false depending on the OS?

Good point.  `OperatingSystemProps.java` can be a OS-specific class like: 

src/java.base/macosx/classes/jdk/internal/misc/OperatingSystemProps.java
              linux/classes/jdk/internal/misc/OperatingSystemProps.java
              windows/classes/jdk/internal/misc/OperatingSystemProps.java


OTOH, if we include `os.arch`, that would need to be a template.   A single template file to include both OS and ARCH would do it.

-------------

PR: https://git.openjdk.org/jdk/pull/12931



More information about the build-dev mailing list