Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce --disable-debuginfo-stripping option #388

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions .github/workflows/buildJDK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ jobs:
fetch-depth: 1
ref: ${{ matrix.mandrel-ref }}
path: ${{ github.workspace }}/mandrel
- uses: actions/checkout@v3
with:
repository: graalvm/mx.git
fetch-depth: 1
ref: master
path: ${{ github.workspace }}/mx
- name: Checkout MX
run: |
VERSION=$(jq -r .mx_version ${MANDREL_REPO}/common.json)
git clone ${GITHUB_SERVER_URL}/graalvm/mx --depth 1 --branch ${VERSION} ${MX_HOME}
./mx/mx --version
- uses: actions/cache@v3
with:
path: ~/.mx
Expand Down Expand Up @@ -82,7 +81,7 @@ jobs:
python-version: '3.10'
- name: Build Mandrel JDK
run: |
${JAVA_HOME}/bin/java -ea build.java --verbose --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tar.gz
${JAVA_HOME}/bin/java -ea build.java --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tar.gz
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java23-linux-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java23-linux-amd64.tar.gz
Expand Down Expand Up @@ -185,7 +184,7 @@ jobs:
- name: Build Mandrel JDK
run: |
export JAVA_HOME=${MAC_JAVA_HOME}
${MAC_JAVA_HOME}/bin/java -ea build.java --verbose --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tar.gz
${MAC_JAVA_HOME}/bin/java -ea build.java --mx-home ${MX_HOME} --mandrel-repo ${MANDREL_REPO} --mandrel-version "${MANDREL_VERSION}" --archive-suffix tar.gz
export MANDREL_VERSION_UNTIL_SPACE="$( echo ${MANDREL_VERSION} | sed -e 's/\([^ ]*\).*/\1/;t' )"
export ARCHIVE_NAME="mandrel-java23-darwin-amd64-${MANDREL_VERSION_UNTIL_SPACE}.tar.gz"
mv ${ARCHIVE_NAME} mandrel-java23-darwin-amd64.tar.gz
Expand Down Expand Up @@ -235,12 +234,12 @@ jobs:
fetch-depth: 1
ref: ${{ matrix.mandrel-ref }}
path: ${{ github.workspace }}/mandrel
- uses: actions/checkout@v3
with:
repository: graalvm/mx.git
fetch-depth: 1
ref: master
path: ${{ github.workspace }}/mx
- name: Checkout MX
shell: bash
run: |
VERSION=$(jq -r .mx_version ${MANDREL_REPO}/common.json)
git clone ${GITHUB_SERVER_URL}/graalvm/mx --depth 1 --branch ${VERSION} ${MX_HOME}
./mx/mx --version
- uses: actions/cache@v3
with:
path: ~/.mx
Expand Down Expand Up @@ -278,7 +277,6 @@ jobs:
}
}
& $Env:JAVA_HOME\bin\java -ea build.java `
--verbose `
--mx-home $Env:MX_HOME `
--mandrel-version $Env:MANDREL_VERSION `
--mandrel-repo $Env:MANDREL_REPO `
Expand Down Expand Up @@ -347,12 +345,11 @@ jobs:
fetch-depth: 1
ref: ${{ matrix.mandrel-ref }}
path: ${{ github.workspace }}/mandrel
- uses: actions/checkout@v3
with:
repository: graalvm/mx.git
fetch-depth: 1
ref: master
path: ${{ github.workspace }}/mx
- name: Checkout MX
run: |
VERSION=$(jq -r .mx_version ${MANDREL_REPO}/common.json)
git clone ${GITHUB_SERVER_URL}/graalvm/mx --depth 1 --branch ${VERSION} ${MX_HOME}
./mx/mx --version
- uses: actions/cache@v3
with:
path: ~/.mx
Expand Down Expand Up @@ -383,7 +380,6 @@ jobs:
run: |
# Build the Java bits
${JAVA_HOME}/bin/java -ea build.java \
--verbose \
--mx-home ${MX_HOME} \
--mandrel-repo ${MANDREL_REPO} \
--mandrel-version "${MANDREL_VERSION}" \
Expand All @@ -396,7 +392,6 @@ jobs:
--mandrel-home temp-build
# Build the native bits
./temp-build/bin/java -ea build.java \
--verbose \
--mx-home ${MX_HOME} \
--mandrel-repo ${MANDREL_REPO} \
--mandrel-version "${MANDREL_VERSION}" \
Expand Down
6 changes: 6 additions & 0 deletions build.java
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ class Options
final String vendor;
final String vendorUrl;
final boolean deployLocally;
final boolean disableDebuginfoStripping;

Options(
boolean mavenDeploy
Expand All @@ -470,6 +471,7 @@ class Options
, String vendor
, String vendorUrl
, boolean deployLocally
, boolean disableDebuginfoStripping
)
{
this.mavenDeploy = mavenDeploy;
Expand All @@ -492,6 +494,7 @@ class Options
this.vendor = vendor;
this.vendorUrl = vendorUrl;
this.deployLocally = deployLocally;
this.disableDebuginfoStripping = disableDebuginfoStripping;
}

public static Options from(Map<String, List<String>> args)
Expand Down Expand Up @@ -530,6 +533,7 @@ public static Options from(Map<String, List<String>> args)
final boolean skipJava = args.containsKey("skip-java");
final boolean skipNative = args.containsKey("skip-native");
final boolean skipNativeAgents = args.containsKey("skip-native-agents");
final boolean disableDebuginfoStripping = args.containsKey("disable-debuginfo-stripping");

final String archiveSuffix = optional("archive-suffix", args);

Expand All @@ -554,6 +558,7 @@ public static Options from(Map<String, List<String>> args)
, vendor
, vendorUrl
, mavenDeployLocal
, disableDebuginfoStripping
);
}

Expand Down Expand Up @@ -1150,6 +1155,7 @@ static Function<BuildArgs, Tasks.Exec> mxbuild(
, "--native-images=lib:native-image-agent,lib:native-image-diagnostics-agent"
, "--components=ni"
, "--exclude-components=nju,svmnfi,svml,tflm"
, options.disableDebuginfoStripping ? "--disable-debuginfo-stripping" : ""
, "build"
)
, buildArgs.args
Expand Down
Loading