Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8204564

Need better error output when GenerateLinkOptData fails

    XMLWordPrintable

Details

    • b07

    Description

      The recipe in generate-link-opt-data is currently hiding stderr output from the java process unless LOG=debug is set. It seems like in normal operation, the tool does not print anything on stderr, so we should just let that through to the console instead of trying to hinder it.

      I just debugged a build error in that recipe and the error was hidden until I ran with LOG=debug. With the below patch, the error was visible, but unfortunately, some bogus log output from the Hello java program gets through instead.

      diff -r 2bea53d7a27b make/GenerateLinkOptData.gmk
      --- a/make/GenerateLinkOptData.gmk
      +++ b/make/GenerateLinkOptData.gmk
      @@ -65,7 +65,7 @@
                  -Djava.lang.invoke.MethodHandle.TRACE_RESOLVE=true \
                  -cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
                  build.tools.classlist.HelloClasslist \
      - $(LOG_DEBUG) 2>&1 > $(JLI_TRACE_FILE)
      + > $(JLI_TRACE_FILE)
              $(GREP) -v HelloClasslist $@.raw > $@
       
       # The jli trace is created by the same recipe as classlist. By declaring these

      Attachments

        Activity

          People

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: