Skip to content

Commit 72a2598

Browse files
authored
Fix polyfill selection for compile tasks + use large distros (#1243)
* Use BSONCXX_POLYFILL for all polyfill configuration * Address -Wunused-parameter warnings * Run compile tasks on large distros
1 parent 761aeb8 commit 72a2598

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

.evergreen/compile.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ set -o pipefail
1515
: "${build_type:?}"
1616
: "${distro_id:?}" # Required by find-cmake-latest.sh.
1717

18+
: "${BSONCXX_POLYFILL:-}"
1819
: "${COMPILE_MACRO_GUARD_TESTS:-}"
1920
: "${ENABLE_CODE_COVERAGE:-}"
2021
: "${ENABLE_TESTS:-}"
2122
: "${generator:-}"
2223
: "${platform:-}"
2324
: "${REQUIRED_CXX_STANDARD:-}"
2425
: "${RUN_DISTCHECK:-}"
25-
: "${USE_POLYFILL_BOOST:-}"
2626
: "${USE_SANITIZER_ASAN:-}"
2727
: "${USE_SANITIZER_UBSAN:-}"
2828
: "${USE_STATIC_LIBS:-}"
@@ -130,9 +130,13 @@ esac
130130
export CMAKE_GENERATOR="${generator:?}"
131131
export CMAKE_GENERATOR_PLATFORM="${platform:-}"
132132

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

137141
cc_flags_init=(-Wall -Wextra -Wno-attributes -Werror -Wno-missing-field-initializers)
138142
cxx_flags_init=(-Wall -Wextra -Wconversion -Wnarrowing -pedantic -Werror)

.mci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ functions:
462462
include_expansions_in_env:
463463
- branch_name
464464
- build_type
465+
- BSONCXX_POLYFILL
465466
- COMPILE_MACRO_GUARD_TESTS
466467
- distro_id
467468
- ENABLE_CODE_COVERAGE
@@ -470,7 +471,6 @@ functions:
470471
- platform
471472
- REQUIRED_CXX_STANDARD
472473
- RUN_DISTCHECK
473-
- USE_POLYFILL_BOOST
474474
- USE_SANITIZER_ASAN
475475
- USE_SANITIZER_UBSAN
476476
- USE_STATIC_LIBS
@@ -2029,7 +2029,7 @@ buildvariants:
20292029
cc_compiler: gcc
20302030
cxx_compiler: g++
20312031
run_on:
2032-
- ubuntu2004-small
2032+
- ubuntu2004-large
20332033
tasks:
20342034
- name: compile_without_tests
20352035
- name: compile_macro_guard_tests
@@ -2042,7 +2042,7 @@ buildvariants:
20422042
cc_compiler: clang
20432043
cxx_compiler: clang++
20442044
run_on:
2045-
- ubuntu2004-small
2045+
- ubuntu2004-large
20462046
tasks:
20472047
- name: clang-tidy
20482048
- name: compile_without_tests
@@ -2066,7 +2066,7 @@ buildvariants:
20662066
cmake: "cmake"
20672067
lib_dir: "lib64"
20682068
run_on:
2069-
- rhel83-zseries-small
2069+
- rhel83-zseries-large
20702070
tasks:
20712071
- name: compile_with_shared_libs
20722072
- name: compile_and_test_with_shared_libs
@@ -2084,7 +2084,7 @@ buildvariants:
20842084
cmake: "cmake"
20852085
lib_dir: "lib64"
20862086
run_on:
2087-
- rhel83-zseries-small
2087+
- rhel83-zseries-large
20882088
tasks:
20892089
- name: compile_with_shared_libs
20902090
- name: compile_and_test_with_shared_libs
@@ -2102,7 +2102,7 @@ buildvariants:
21022102
cmake: "cmake"
21032103
lib_dir: "lib64"
21042104
run_on:
2105-
- rhel83-zseries-small
2105+
- rhel83-zseries-large
21062106
tasks:
21072107
- name: compile_with_shared_libs
21082108
- name: compile_and_test_with_shared_libs
@@ -2181,7 +2181,7 @@ buildvariants:
21812181
display_name: "MacOS 11.0 Release (Boost) (MongoDB Latest)"
21822182
expansions:
21832183
build_type: "Release"
2184-
USE_POLYFILL_BOOST: ON
2184+
BSONCXX_POLYFILL: "boost"
21852185
mongodb_version: "latest"
21862186
run_on:
21872187
- macos-1100
@@ -2195,7 +2195,7 @@ buildvariants:
21952195
display_name: "MacOS 11.0 Release (Boost) (MongoDB 5.0)"
21962196
expansions:
21972197
build_type: "Release"
2198-
USE_POLYFILL_BOOST: ON
2198+
BSONCXX_POLYFILL: "boost"
21992199
mongodb_version: "5.0"
22002200
run_on:
22012201
- macos-1100
@@ -2209,7 +2209,7 @@ buildvariants:
22092209
display_name: "MacOS 11.0 Release Versioned API"
22102210
expansions:
22112211
build_type: "Release"
2212-
USE_POLYFILL_BOOST: ON
2212+
BSONCXX_POLYFILL: "boost"
22132213
mongodb_version: "latest"
22142214
run_on:
22152215
- macos-1100
@@ -2283,6 +2283,6 @@ buildvariants:
22832283
build_type: "Release"
22842284
BSONCXX_POLYFILL: impls
22852285
run_on:
2286-
- rhel79-small
2286+
- rhel79-large
22872287
tasks:
22882288
- name: compile_without_tests

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/stdx/optional.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ struct optional_assign_base<T, movable> : optional_construct_base<T> {
506506

507507
// Allow move-assignment.
508508

509-
bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&& other) = default;
509+
bsoncxx_cxx14_constexpr optional_assign_base& operator=(optional_assign_base&&) = default;
510510
};
511511

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

531531
optional_construct_base(const optional_construct_base&) = delete;
532-
optional_construct_base(optional_construct_base&& other) = default;
532+
optional_construct_base(optional_construct_base&&) = default;
533533
optional_construct_base& operator=(const optional_construct_base&) = default;
534534
optional_construct_base& operator=(optional_construct_base&&) = default;
535535
};

0 commit comments

Comments
 (0)