For every spawn, GNU make iterates all variables to find the exported ones. The JDK build has many variables and many spawns, so a significant fraction of make's CPU time is iterating variables during a JDK build.
This change undefines variables from two frequently used macros, SetupNativeCompilationBody and CreateCompiledNativeFileBody, after the variables are no longer needed. This simple change removes 60% of the variables from the JtregNativeHotspot submake and 55% of make variables from the hotspot submake. Overall, this saves 38% of make CPU time on a clean build to run one jtreg test. --------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - copyright - 8394898: Make variables cause overhead Changes: https://git.openjdk.org/jdk/pull/33454/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=33454&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8394898 Stats: 42 lines in 3 files changed: 40 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/33454.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33454/head:pull/33454 PR: https://git.openjdk.org/jdk/pull/33454
