Skip to content
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
42 changes: 37 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ jobs:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get -qq update
sudo apt-get -qq install -y --no-install-recommends \
gcc-multilib \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised we can simply get rid of these -- do you know why?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to remove them, otherwise I got this error

"E: Unable to correct problems, you have held broken packages.
Error: Process completed with exit code 100."

Here is the AI explanation why they have to be removed:

"The error E: Unable to correct problems, you have held broken packages occurred because gcc-multilib (which allows the native x86_64 compiler to build 32-bit x86 binaries) conflicts with cross-compilers like g++-aarch64-linux-gnu in Debian/Ubuntu packaging. They cannot easily coexist because they compete for similar multi-architecture file paths and header locations."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this more -- I guess the old ones are 32 bit platforms which we don't use anymore.

g++-multilib \
g++-aarch64-linux-gnu \
ninja-build \
openjdk-11-jre-headless

Expand Down Expand Up @@ -141,13 +140,30 @@ jobs:
popd

- name: Build BoringSSL 64-bit Linux
# Please keep this in sync with other "Build BoringSSL 64-bit Linux"
if: runner.os == 'Linux'
run: |
mkdir -p "$BORINGSSL_HOME/build64"
pushd "$BORINGSSL_HOME/build64"
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -GNinja ..
ninja
popd

- name: Build BoringSSL AArch64 Linux
# Please keep this in sync with other "Build BoringSSL AArch64 Linux"
if: runner.os == 'Linux'
run: |
mkdir -p "$BORINGSSL_HOME/build.arm"
pushd "$BORINGSSL_HOME/build.arm"
cmake -DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-GNinja ..
ninja
popd

- name: Set up MSVC paths on Windows
if: runner.os == 'Windows'
Expand Down Expand Up @@ -231,8 +247,7 @@ jobs:
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get -qq update
sudo apt-get -qq install -y --no-install-recommends \
gcc-multilib \
g++-multilib \
g++-aarch64-linux-gnu \
ninja-build \
openjdk-11-jre-headless

Expand All @@ -255,12 +270,27 @@ jobs:
git checkout --progress --force -B main

- name: Build BoringSSL 64-bit Linux
# Please keep this in sync with other "Build BoringSSL 64-bit Linux"
run: |
mkdir -p "$BORINGSSL_HOME/build64"
pushd "$BORINGSSL_HOME/build64"
cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -GNinja ..
ninja
popd

- name: Build BoringSSL AArch64 Linux
# Please keep this in sync with other "Build BoringSSL AArch64 Linux"
run: |
mkdir -p "$BORINGSSL_HOME/build.arm"
pushd "$BORINGSSL_HOME/build.arm"
cmake -DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_SYSTEM_PROCESSOR=aarch64 \
-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc \
-DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ \
-DCMAKE_POSITION_INDEPENDENT_CODE=TRUE \
-DCMAKE_BUILD_TYPE=Release \
-GNinja ..
ninja

# TODO(prb) remove build dependency above and go back to this.
# - name: Make fake BoringSSL directories
Expand Down Expand Up @@ -313,12 +343,14 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, ubuntu-latest, macos-14, macos-latest, windows-latest]
platform: [ubuntu-22.04, ubuntu-22.04-arm, ubuntu-latest, macos-14, macos-latest, windows-latest]
java: [8, 11, 17, 21, 25, EA]
dist: ['temurin', 'zulu']
include:
- platform: ubuntu-22.04
separator: ':'
- platform: ubuntu-22.04-arm
separator: ':'
- platform: ubuntu-latest
separator: ':'
- platform: macos-latest
Expand Down
9 changes: 7 additions & 2 deletions build-logic/src/main/groovy/conventions.cpp.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ model {
}
}
}
gcc(Gcc)
gcc(Gcc) {
target("linux_aarch64") {
cppCompiler.executable = 'aarch64-linux-gnu-g++'
linker.executable = 'aarch64-linux-gnu-g++'
}
}
}
}
}
2 changes: 1 addition & 1 deletion openjdk-uber/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Directory buildTop = layout.buildDirectory.get()
ext {
buildUberJar = Boolean.parseBoolean(System.getProperty('org.conscrypt.openjdk.buildUberJar', 'false'))
uberJarClassifiers = (System.getProperty('org.conscrypt.openjdk.uberJarClassifiers',
'osx-x86_64,osx-aarch_64,linux-x86_64,windows-x86_64')).split(',')
'osx-x86_64,osx-aarch_64,linux-x86_64,linux-aarch_64,windows-x86_64')).split(',')
classesDir = buildTop.dir('classes')
resourcesDir = buildTop.dir('resources')
sourcesDir = buildTop.dir('sources')
Expand Down
11 changes: 10 additions & 1 deletion openjdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ description = 'Conscrypt: OpenJdk'
enum NativeBuildInfo {
WINDOWS_X86_64("windows", "x86_64"),
LINUX_X86_64("linux", "x86_64"),
LINUX_AARCH64("linux", "aarch_64") {
String libDir() {
"build.arm"
}
},
MAC_X86_64("osx", "x86_64") {
String libDir() {
"build.x86"
Expand Down Expand Up @@ -529,7 +534,11 @@ model {
def stripTask = binary.tasks.taskName("strip")
project.tasks.register(stripTask as String, Exec) {
dependsOn binary.tasks.link
executable "strip"
if (nativeBuild == NativeBuildInfo.LINUX_AARCH64) {
executable "aarch64-linux-gnu-strip"
} else {
executable "strip"
}
args binary.tasks.link.linkedFile.asFile.get()
}
copyTask.configure {
Expand Down
Loading