Skip to content

Commit a4070ec

Browse files
committed
[GR-11085] Moved jdk8 specific code into jdk8 specific overlay projects.
PullRequest: graal/1954
2 parents 364b5e0 + a4a936c commit a4070ec

File tree

101 files changed

+1165
-753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+1165
-753
lines changed

common.hocon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ labsjdk8Debug : { downloads : { JAVA_HOME : ${jdks.labsjdk8Debug}, EXTRA_JAVA_HO
2929

3030
openjdk8 : { downloads : { JAVA_HOME : ${jdks.openjdk8} }}
3131

32-
oraclejdk11 : { downloads : { JAVA_HOME : ${jdks.oraclejdk11}, EXTRA_JAVA_HOMES : { pathlist :[ ${jdks.labsjdk8} ]} }}
32+
oraclejdk11 : { downloads : { JAVA_HOME : ${jdks.oraclejdk11} }}
3333

3434
common : ${mx} {
3535
timelimit : "30:00"

compiler/README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@ git clone https://github.com/graalvm/mx.git
2121
export PATH=$PWD/mx:$PATH
2222
```
2323

24-
Graal depends on a JDK that supports a compatible version of JVMCI ([JVM Compiler Interface](https://bugs.openjdk.java.net/browse/JDK-8062493)). There is a JVMCI
25-
[port](https://github.com/graalvm/graal-jvmci-8) for JDK 8 and the required JVMCI version is built into the JDK as of JDK 11-ea+20.
24+
Graal depends on a JDK that supports a compatible version of JVMCI ([JVM Compiler Interface](https://bugs.openjdk.java.net/browse/JDK-8062493)).
25+
There is a JVMCI [port](https://github.com/graalvm/graal-jvmci-8) for JDK 8 and the required JVMCI version is built into the JDK as of JDK 11.
26+
To develop Graal you need either a JVMCI-enabled JDK 8 (download from [OTN](http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html) or [build](#building-jvmci-jdk8) yourself)
27+
or JDK 11 (build 20 or later).
2628

27-
Graal currently requires a JVMCI-enabled JDK 8 (download from [OTN](http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html) or [build](#building-jvmci-jdk8) yourself) and will do so until all JDK 8 specific Graal code is factored out as [versioned sources](https://github.com/graalvm/mx#versioning-sources-for-different-jdk-releases).
28-
Developing versioned sources specific to other JDKs requires them to be made
29-
available on the `EXTRA_JAVA_HOMES` environment variable. At the time of writing, this
30-
JDK 11-ea+20 ([early access build](http://jdk.java.net/11/) should work but a build from
31-
the [latest bits](http://hg.openjdk.java.net/jdk/jdk/) is required if Graal targets features not yet in an early access build).
29+
Most Graal sources are compliant with Java 8. Some sources use API specific to JDK 8 or only introduced in JDK 9.
30+
These sources are in [versioned projects](https://github.com/graalvm/mx#versioning-sources-for-different-jdk-releases).
31+
If you don't have a JDK that satisfies the requirement of a versioned project, the project is ignored by mx.
32+
You specify the JDK(s) available to mx with the `JAVA_HOME` and `EXTRA_JAVA_HOMES` environment variables.
3233

3334
Here is a typical set up for specifying multiple JDKs on Linux:
3435
```
35-
export JAVA_HOME=/usr/lib/jvm/labsjdk1.8.0_172-jvmci-0.44
36+
export JAVA_HOME=/usr/lib/jvm/labsjdk1.8.0_172-jvmci-0.46
3637
export EXTRA_JAVA_HOMES=/usr/lib/jvm/jdk-11
3738
```
3839
And on macOS:
3940
```
40-
export JAVA_HOME=/Library/Java/JavaVirtualMachines/labsjdk1.8.0_172-jvmci-0.44/Contents/Home
41+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/labsjdk1.8.0_172-jvmci-0.46/Contents/Home
4142
export EXTRA_JAVA_HOMES=/Library/Java/JavaVirtualMachines/jdk-11.jdk/Contents/Home
4243
```
43-
If you omit `EXTRA_JAVA_HOMES`, the associated sources will not be built. Note that `JAVA_HOME` defines the *primary* JDK for development. For instance, when running `mx vm`, this is the JDK that will be used so if you want to run on JDK 11, swap JDK 8 and JDK 11 in `JAVA_HOME` and `EXTRA_JAVA_HOMES`.
44+
If you omit `EXTRA_JAVA_HOMES` in the above examples, versioned projects depending on JDK 9 or later will be ignored.
45+
Note that `JAVA_HOME` defines the *primary* JDK for development. For instance, when running `mx vm`, this is the JDK that will be used so if you want to run on JDK 11, swap JDK 8 and JDK 11 in `JAVA_HOME` and `EXTRA_JAVA_HOMES`.
4446

4547
Now change to the `graal/compiler` directory:
4648

compiler/docs/IDEs.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To make IntelliJ work the same way as Eclipse with respect to Problems View and
3939
### Eclipse
4040
This section describes how to set up Eclipse for Graal development. For convenience, `$GRAAL` denotes your local Graal repository.
4141

42-
Eclipse can be downloaded [here](http://download.eclipse.org/eclipse/downloads/). The currently recommended version for Graal development is 4.7.3a.
42+
Eclipse can be downloaded [here](http://download.eclipse.org/eclipse/downloads/). The currently recommended version for Graal development is 4.7.3a ("Oxygen").
4343

4444
Once you have installed Eclipse, if you have multiple Java versions on your computer, you should edit [eclipse.ini](http://wiki.eclipse.org/Eclipse.ini) to [specify the JVM](http://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM) that Eclipse will be run with. It must be run with a JDK 9 or later VM. For example:
4545
```
@@ -49,11 +49,12 @@ Once you have installed Eclipse, if you have multiple Java versions on your comp
4949

5050
When first launching Eclipse, you should create a new workspace for Graal development. Select the parent of `$GRAAL` as the workspace as you will also be importing projects from the suites that Graal depends on.
5151

52-
The configurations created by the `mx eclipseinit` command binds projects to Execution Environments corresponding to the Java compliance level of the projects. You need to configure these Execution Environments as follows:
52+
The configurations created by the `mx eclipseinit` command binds projects to Execution Environments or JREs corresponding to the Java compliance level of the projects. You need to configure these Execution Environments and JREs as follows:
5353

5454
1. From the main menu bar, select **Window > Preferences**.
55-
2. On the left, select **Java > Installed JREs > Execution Environments**
56-
3. Configure the **JavaSE-1.8**, **JavaSE-9**, **JavaSE-10** etc environments. You may need to first add any missing JREs.
55+
2. On the left, select **Java > Installed JREs**
56+
3. Ensure there is an installed JRE with the name `jdk-11`.
57+
4. Select **Execution Environments** and configure the **JavaSE-1.8** environment.
5758
4. Click **OK**
5859

5960
Run `mx eclipseinit` to create the Eclipse project configurations for all the Java projects then use the **Import Wizard** to import the created/updated projects:

0 commit comments

Comments
 (0)