How does ct.sym get created under the new build?

Joe Darcy joe.darcy at oracle.com
Mon Feb 18 19:09:16 PST 2013


Hello,

Previously, I added a new "jdk.Supported" annotation type to the 
platform [1] With some effort, this file was included in rt.jar under 
both new and old builds.

I've been working on applying this annotation to the langtools repo to 
document that the javac tree API (com.sun.source.*) is JDK-supported. 
That all went fine until I did a build of a repo with the annotation 
and, just to be extra cautious, I ran the langtools regression tests. 
Several tests failed because while jdk.Supported is in rt.jar, it is not 
currently in ct.sym (and thus not visible by default during compilation).

No problem, I just need to get "jdk" added to the list of packages used 
to construct ct.sym. I took a stab at doing this:

$ hg diff
diff -r bcde0486261e make/docs/Makefile
--- a/make/docs/Makefile    Mon Feb 18 08:14:18 2013 +0000
+++ b/make/docs/Makefile    Mon Feb 18 19:02:16 2013 -0800
@@ -1008,7 +1008,7 @@
  TREEAPI_HEADER       := <strong>Compiler Tree API</strong>
  TREEAPI_BOTTOM       := $(call 
CommonBottom,$(TREEAPI_FIRST_COPYRIGHT_YEAR))
  TREEAPI_GROUPNAME    := Packages
-TREEAPI_REGEXP       := com.sun.source.*
+TREEAPI_REGEXP       := com.sun.source.*:jdk
  # TREEAPI_PKGS is located in NON_CORE_PKGS.gmk

  TREEAPI_INDEX_HTML    = $(TREEAPI_DOCDIR)/index.html
diff -r bcde0486261e make/docs/NON_CORE_PKGS.gmk
--- a/make/docs/NON_CORE_PKGS.gmk    Mon Feb 18 08:14:18 2013 +0000
+++ b/make/docs/NON_CORE_PKGS.gmk    Mon Feb 18 19:02:16 2013 -0800
@@ -78,7 +78,8 @@

  TREEAPI_PKGS      = com.sun.source.doctree \
             com.sun.source.tree \
-           com.sun.source.util
+           com.sun.source.util \
+           jdk

  SMARTCARDIO_PKGS = javax.smartcardio

@@ -91,6 +92,8 @@
                     com.apple.eio
  endif

+JDK_PKGS        = jdk
+
  # non-core packages in rt.jar
  NON_CORE_PKGS    = $(DOMAPI_PKGS) \
                     $(MGMT_PKGS) \
@@ -101,5 +104,6 @@
                     $(HTTPSERVER_PKGS) \
                     $(SMARTCARDIO_PKGS) \
                     $(SCTPAPI_PKGS) \
-                   $(APPLE_EXT_PKGS)
+                   $(APPLE_EXT_PKGS)\
+                   $(JDK_PKGS)

but to no avail. The modifications above do *not* seem to influence the 
construction of ct.sym under the new build. After making these changes, 
I've rerun configure, done a make clean, then a make, etc.

Turning on logging during an images build,

[...]
/bin/mkdir -p 
/home/darcy/Sun/OpenJDK/8/hg/tl/build/linux-x86_64-normal-server-release/images/symbols/META-INF/sym
/home/darcy/Sun/OpenJDK/jdk1.7.0_02/bin/java -Xms64M -Xmx1100M 
-XX:PermSize=32m -XX:MaxPermSize=160m -XX:ThreadStackSize=1536 
"-Xbootclasspath/p:/home/darcy/Sun/OpenJDK/8/hg/tl/build/linux-x86_64-normal-server-release/langtools/dist/bootstrap/lib/javac.jar" 
-cp 
/home/darcy/Sun/OpenJDK/8/hg/tl/build/linux-x86_64-normal-server-release/langtools/dist/bootstrap/lib/javac.jar 
com.sun.tools.javac.Main \
         -bootclasspath 
/home/darcy/Sun/OpenJDK/8/hg/tl/build/linux-x86_64-normal-server-release/jdk/classes 
\
         -XDprocess.packages -proc:only \
         [... long list of packages]

The packages do not seem to be passed in the order indicated by the 
command in jdk/make/common/Release.gmk.

As an experiment, I went in and hacked in "add("jdk")" to the 
CreateSymbols program in langtools which constructs ct.sym; if the jdk 
package is included manually, all works fine. This rules out problem in 
langtools in processing the jdk package.

How can I get the "jdk" package included in ct.sym in the new build?

Thanks,

-Joe

[1] 8001614: Include annotation type to documented supported-ness,
http://hg.openjdk.java.net/jdk8/tl/langtools/rev/55cca2f38ee6



More information about the build-infra-dev mailing list