Skip to content

Fix polyfill selection for compile tasks + use large distros #1243

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

Merged
merged 3 commits into from
Oct 29, 2024
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
12 changes: 8 additions & 4 deletions .evergreen/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ set -o pipefail
: "${build_type:?}"
: "${distro_id:?}" # Required by find-cmake-latest.sh.

: "${BSONCXX_POLYFILL:-}"
: "${COMPILE_MACRO_GUARD_TESTS:-}"
: "${ENABLE_CODE_COVERAGE:-}"
: "${ENABLE_TESTS:-}"
: "${generator:-}"
: "${platform:-}"
: "${REQUIRED_CXX_STANDARD:-}"
: "${RUN_DISTCHECK:-}"
: "${USE_POLYFILL_BOOST:-}"
: "${USE_SANITIZER_ASAN:-}"
: "${USE_SANITIZER_UBSAN:-}"
: "${USE_STATIC_LIBS:-}"
Expand Down Expand Up @@ -130,9 +130,13 @@ esac
export CMAKE_GENERATOR="${generator:?}"
export CMAKE_GENERATOR_PLATFORM="${platform:-}"

if [[ "${USE_POLYFILL_BOOST:-}" == "ON" ]]; then
cmake_flags+=("-DBSONCXX_POLY_USE_BOOST=ON")
fi
case "${BSONCXX_POLYFILL:-}" in
mnmlstc) cmake_flags+=(-D "BSONCXX_POLY_USE_MNMLSTC=ON") ;;
boost) cmake_flags+=(-D "BSONCXX_POLY_USE_BOOST=ON") ;;
impls) cmake_flags+=(-D "BSONCXX_POLY_USE_IMPLS=ON") ;;
std) cmake_flags+=(-D "BSONCXX_POLY_USE_STD=ON") ;;
*) ;;
esac

cc_flags_init=(-Wall -Wextra -Wno-attributes -Werror -Wno-missing-field-initializers)
cxx_flags_init=(-Wall -Wextra -Wconversion -Wnarrowing -pedantic -Werror)
Expand Down
20 changes: 10 additions & 10 deletions .mci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,7 @@ functions:
include_expansions_in_env:
- branch_name
- build_type
- BSONCXX_POLYFILL
- COMPILE_MACRO_GUARD_TESTS
- distro_id
- ENABLE_CODE_COVERAGE
Expand All @@ -470,7 +471,6 @@ functions:
- platform
- REQUIRED_CXX_STANDARD
- RUN_DISTCHECK
- USE_POLYFILL_BOOST
- USE_SANITIZER_ASAN
- USE_SANITIZER_UBSAN
- USE_STATIC_LIBS
Expand Down Expand Up @@ -2029,7 +2029,7 @@ buildvariants:
cc_compiler: gcc
cxx_compiler: g++
run_on:
- ubuntu2004-small
- ubuntu2004-large
tasks:
- name: compile_without_tests
- name: compile_macro_guard_tests
Expand All @@ -2042,7 +2042,7 @@ buildvariants:
cc_compiler: clang
cxx_compiler: clang++
run_on:
- ubuntu2004-small
- ubuntu2004-large
tasks:
- name: clang-tidy
- name: compile_without_tests
Expand All @@ -2066,7 +2066,7 @@ buildvariants:
cmake: "cmake"
lib_dir: "lib64"
run_on:
- rhel83-zseries-small
- rhel83-zseries-large
tasks:
- name: compile_with_shared_libs
- name: compile_and_test_with_shared_libs
Expand All @@ -2084,7 +2084,7 @@ buildvariants:
cmake: "cmake"
lib_dir: "lib64"
run_on:
- rhel83-zseries-small
- rhel83-zseries-large
tasks:
- name: compile_with_shared_libs
- name: compile_and_test_with_shared_libs
Expand All @@ -2102,7 +2102,7 @@ buildvariants:
cmake: "cmake"
lib_dir: "lib64"
run_on:
- rhel83-zseries-small
- rhel83-zseries-large
tasks:
- name: compile_with_shared_libs
- name: compile_and_test_with_shared_libs
Expand Down Expand Up @@ -2181,7 +2181,7 @@ buildvariants:
display_name: "MacOS 11.0 Release (Boost) (MongoDB Latest)"
expansions:
build_type: "Release"
USE_POLYFILL_BOOST: ON
BSONCXX_POLYFILL: "boost"
mongodb_version: "latest"
run_on:
- macos-1100
Expand All @@ -2195,7 +2195,7 @@ buildvariants:
display_name: "MacOS 11.0 Release (Boost) (MongoDB 5.0)"
expansions:
build_type: "Release"
USE_POLYFILL_BOOST: ON
BSONCXX_POLYFILL: "boost"
mongodb_version: "5.0"
run_on:
- macos-1100
Expand All @@ -2209,7 +2209,7 @@ buildvariants:
display_name: "MacOS 11.0 Release Versioned API"
expansions:
build_type: "Release"
USE_POLYFILL_BOOST: ON
BSONCXX_POLYFILL: "boost"
mongodb_version: "latest"
run_on:
- macos-1100
Expand Down Expand Up @@ -2283,6 +2283,6 @@ buildvariants:
build_type: "Release"
BSONCXX_POLYFILL: impls
run_on:
- rhel79-small
- rhel79-large
tasks:
- name: compile_without_tests
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ struct optional_assign_base<T, movable> : optional_construct_base<T> {

// Allow move-assignment.

bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&& other) = default;
bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&&) = default;
};

template <typename T>
Expand All @@ -529,7 +529,7 @@ struct optional_construct_base<T, movable> : optional_destruct_base<T> {
optional_construct_base() = default;

optional_construct_base(const optional_construct_base&) = delete;
optional_construct_base(optional_construct_base&& other) = default;
optional_construct_base(optional_construct_base&&) = default;
optional_construct_base& operator=(const optional_construct_base&) = default;
optional_construct_base& operator=(optional_construct_base&&) = default;
};
Expand Down