Skip to content

Commit 5a12694

Browse files
xuhdevfacebook-github-bot
authored andcommitted
Bring back 32 bit test to test type sizes (#945)
Summary: Do so by use Debian's multiarch. Differential Revision: D77066796
1 parent 978aeb1 commit 5a12694

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

.github/workflows/build_and_test.yml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ env:
55
CACHE_VERSION: xxxxx1
66
jobs:
77
linux-gcc:
8-
name: Linux GCC ${{ matrix.os }}
8+
name: Linux GCC - ${{ matrix.os }} - ${{ matrix.bit32 && 'x86' || 'x86_64' }}
99
runs-on: 4-core-ubuntu
1010
container: ${{ matrix.os }}
1111
strategy:
@@ -15,6 +15,10 @@ jobs:
1515
- "debian:12"
1616
- "ubuntu:22.04"
1717
- "ubuntu:24.04"
18+
bit32: [false]
19+
include:
20+
- os: debian:12
21+
bit32: true
1822
steps:
1923
- name: Show OS info
2024
run: cat /etc/os-release
@@ -25,26 +29,9 @@ jobs:
2529
- uses: ./.github/actions/setup-build-and-test-w-make
2630
with:
2731
save_boost_cache: false
28-
mode_32: false
32+
mode_32: ${{ matrix.bit32 }}
2933
job_name: ${{ github.job.name }}
3034

31-
# No supported Github runners:
32-
# * debian unstable
33-
# `mode_32` failed on boost lib
34-
# build-deb_stable-32:
35-
# runs-on: 4-core-ubuntu
36-
# steps:
37-
# - uses: actions/[email protected]
38-
# - uses: "./.github/actions/build_debian"
39-
# with:
40-
# mode_32: true
41-
# job_name: debian_12_32
42-
#
43-
# For new-style config we'd need:
44-
# setup_toolchain_extra: '32'
45-
# configure_extra: "--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"
46-
#
47-
#
4835
build-deb_stable-w-clang-llvm-org:
4936
runs-on: 4-core-ubuntu
5037
env:

opt/typedef-anno-checker/TypedefAnnoPatcher.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ void TypedefAnnoPatcher::fix_kt_enum_ctor_param(const DexClass* cls,
399399
}
400400
if (add_param_annotation(ctor, *annotation, patch_idx, class_stats)) {
401401
TRACE(TAC, 2,
402-
"[patcher] Fixed Kotlin enum ctor param w/ %s at %ld on %s",
402+
"[patcher] Fixed Kotlin enum ctor param w/ %s at %zu on %s",
403403
SHOW(panno.second), patch_idx, SHOW(ctor));
404404
}
405405
}

setup_oss_toolchain.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ else
2525
fi
2626

2727
if [ "$1" = "32" ] ; then
28+
dpkg --add-architecture i386
29+
2830
BITNESS="32"
2931
BITNESS_SUFFIX=":i386"
3032
BITNESS_CONFIGURE="--host=i686-linux-gnu CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32"
@@ -60,7 +62,11 @@ function install_googletest_from_source {
6062
mkdir -p toolchain_install/gtest
6163
pushd toolchain_install/gtest
6264
tar xf "../../dl_cache/gtest/googletest-${GOOGLETEST_MIN_VERSION}.tar.gz" --no-same-owner --strip-components=1
63-
CXXFLAGS=-std=gnu++17 cmake .
65+
if [ "$BITNESS" = "32" ] ; then
66+
CFLAGS=-m32 CXXFLAGS="-m32 -std=gnu++17" LDFLAGS=-m32 cmake .
67+
else
68+
CXXFLAGS="-std=gnu++17" cmake .
69+
fi
6470
cmake --build . --target install
6571
popd
6672
popd

0 commit comments

Comments
 (0)