зеркало из https://github.com/microsoft/snmalloc.git
Don't require 16-byte CAS on x86. (#173)
* Don't require 16-byte CAS on x86. We only need to CAS 2 pointers, which is always possible on x86. * Fix the way the Image variable is referenced. * Replace failOnStderr by `set -eo pipefail` on Linux. The x86 image doesn't have clangformat, which causes cmake to print a warning on the stderr. Exit codes should be enough to detect failure. * Use x86 images from snmallocciteam. * clang-format
This commit is contained in:
Родитель
2b92574123
Коммит
0f5cc165e8
|
@ -9,97 +9,123 @@ jobs:
|
||||||
displayName: Linux
|
displayName: Linux
|
||||||
pool:
|
pool:
|
||||||
vmImage: 'ubuntu-18.04'
|
vmImage: 'ubuntu-18.04'
|
||||||
container: snmallocciteam/build_linux_x64:latest
|
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
Clang-7 Debug:
|
64-bit Clang-7 Debug:
|
||||||
CC: clang-7
|
CC: clang-7
|
||||||
CXX: clang++-7
|
CXX: clang++-7
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Clang-7 Release:
|
64-bit Clang-7 Release:
|
||||||
CC: clang-7
|
CC: clang-7
|
||||||
CXX: clang++-7
|
CXX: clang++-7
|
||||||
BuildType: Release
|
BuildType: Release
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Clang-8 Debug:
|
64-bit Clang-8 Debug:
|
||||||
CC: clang-8
|
CC: clang-8
|
||||||
CXX: clang++-8
|
CXX: clang++-8
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Clang-8 Release:
|
64-bit Clang-8 Release:
|
||||||
CC: clang-8
|
CC: clang-8
|
||||||
CXX: clang++-8
|
CXX: clang++-8
|
||||||
BuildType: Release
|
BuildType: Release
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Clang-9 Debug:
|
64-bit Clang-9 Debug:
|
||||||
CC: clang-9
|
CC: clang-9
|
||||||
CXX: clang++-9
|
CXX: clang++-9
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Clang-9 Release:
|
64-bit Clang-9 Release:
|
||||||
CC: clang-9
|
CC: clang-9
|
||||||
CXX: clang++-9
|
CXX: clang++-9
|
||||||
BuildType: Release
|
BuildType: Release
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
GCC-8 Debug:
|
64-bit GCC-8 Debug:
|
||||||
CC: gcc-8
|
CC: gcc-8
|
||||||
CXX: g++-8
|
CXX: g++-8
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
GCC-8 Release:
|
64-bit GCC-8 Release:
|
||||||
CC: gcc-8
|
CC: gcc-8
|
||||||
CXX: g++-8
|
CXX: g++-8
|
||||||
BuildType: Release
|
BuildType: Release
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Self Host:
|
64-bit Self Host:
|
||||||
CC: clang-7
|
CC: clang-7
|
||||||
CXX: clang++-7
|
CXX: clang++-7
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: true
|
SelfHost: true
|
||||||
CMakeArgs: ''
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
Cache Friendly:
|
64-bit Cache Friendly:
|
||||||
CC: clang-7
|
CC: clang-7
|
||||||
CXX: clang++-7
|
CXX: clang++-7
|
||||||
BuildType: Debug
|
BuildType: Debug
|
||||||
SelfHost: false
|
SelfHost: false
|
||||||
CMakeArgs: '-DCACHE_FRIENDLY_OFFSET=64'
|
CMakeArgs: '-DCACHE_FRIENDLY_OFFSET=64'
|
||||||
|
Image: snmallocciteam/build_linux_x64:latest
|
||||||
|
|
||||||
|
32-bit Clang-9 Debug:
|
||||||
|
CC: clang-9
|
||||||
|
CXX: clang++-9
|
||||||
|
BuildType: Debug
|
||||||
|
SelfHost: false
|
||||||
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x86:latest
|
||||||
|
|
||||||
|
32-bit Clang-9 Release:
|
||||||
|
CC: clang-9
|
||||||
|
CXX: clang++-9
|
||||||
|
BuildType: Release
|
||||||
|
SelfHost: false
|
||||||
|
CMakeArgs: ''
|
||||||
|
Image: snmallocciteam/build_linux_x86:latest
|
||||||
|
|
||||||
|
container: $[ variables['Image'] ]
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
|
set -eo pipefail
|
||||||
ci/scripts/build.sh
|
ci/scripts/build.sh
|
||||||
env:
|
env:
|
||||||
CC: $(CC)
|
CC: $(CC)
|
||||||
CXX: $(CXX)
|
CXX: $(CXX)
|
||||||
BUILD_TYPE: $(BuildType)
|
BUILD_TYPE: $(BuildType)
|
||||||
CMAKE_ARGS: $(CMakeArgs)
|
CMAKE_ARGS: $(CMakeArgs)
|
||||||
failOnStderr: true
|
|
||||||
displayName: 'Build'
|
displayName: 'Build'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
|
set -eo pipefail
|
||||||
ci/scripts/test.sh
|
ci/scripts/test.sh
|
||||||
env:
|
env:
|
||||||
SELF_HOST: $(SelfHost)
|
SELF_HOST: $(SelfHost)
|
||||||
BUILD_TYPE: $(BuildType)
|
BUILD_TYPE: $(BuildType)
|
||||||
failOnStderr: true
|
|
||||||
displayName: 'Test'
|
displayName: 'Test'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
FROM multiarch/ubuntu-core:x86-bionic
|
||||||
|
|
||||||
|
WORKDIR /src
|
||||||
|
|
||||||
|
RUN apt update \
|
||||||
|
&& apt install --no-install-recommends -y ninja-build clang++-9 cmake \
|
||||||
|
&& apt -y clean
|
|
@ -99,9 +99,11 @@ namespace snmalloc
|
||||||
(__int64)value,
|
(__int64)value,
|
||||||
(__int64*)&old);
|
(__int64*)&old);
|
||||||
# else
|
# else
|
||||||
# if defined(__GNUC__) && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
# if defined(__GNUC__) && defined(SNMALLOC_VA_BITS_64) && \
|
||||||
|
!defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
||||||
#error You must compile with -mcx16 to enable 16-byte atomic compare and swap.
|
#error You must compile with -mcx16 to enable 16-byte atomic compare and swap.
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
Linked xchg{value, old.aba + 1};
|
Linked xchg{value, old.aba + 1};
|
||||||
std::atomic<Linked>& addr = parent->linked;
|
std::atomic<Linked>& addr = parent->linked;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче