Skip to content

Commit 4f77b81

Browse files
Cyan4973jcelerier
authored andcommitted
Merge pull request #3777 from facebook/fix_x32
fix x32 tests on Github CI
2 parents 43118da + 2c17e05 commit 4f77b81

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.github/workflows/dev-short-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
CFLAGS="-m32 -O1 -fstack-protector" make check V=1
3939
4040
check-x32:
41-
runs-on: ubuntu-latest
41+
runs-on: ubuntu-20.04 # ubuntu-latest == ubuntu-22.04 have issues currently with x32
4242
steps:
4343
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v3
4444
- name: make check on x32 ABI # https://en.wikipedia.org/wiki/X32_ABI

build/cmake/lib/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ include_directories(${LIBRARY_DIR} ${LIBRARY_DIR}/common)
3838

3939
file(GLOB CommonSources ${LIBRARY_DIR}/common/*.c)
4040
file(GLOB CompressSources ${LIBRARY_DIR}/compress/*.c)
41+
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c)
4142
if (MSVC)
42-
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c)
4343
add_compile_options(-DZSTD_DISABLE_ASM)
4444
else ()
45-
file(GLOB DecompressSources ${LIBRARY_DIR}/decompress/*.c ${LIBRARY_DIR}/decompress/*.S)
45+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|AMD64.*|x86_64.*|X86_64.*")
46+
set(DecompressSources ${DecompressSources} ${LIBRARY_DIR}/decompress/huf_decompress_amd64.S)
47+
else()
48+
add_compile_options(-DZSTD_DISABLE_ASM)
49+
endif()
4650
endif ()
4751
file(GLOB DictBuilderSources ${LIBRARY_DIR}/dictBuilder/*.c)
4852
file(GLOB DeprecatedSources ${LIBRARY_DIR}/deprecated/*.c)

0 commit comments

Comments
 (0)