SERVER-116297 upgrade to MSVC 14.44.35207 (#46476)
GitOrigin-RevId: 99b1c444b7037e857b0bab3e4041957190b262fd
This commit is contained in:
parent
8afe1ec0ce
commit
eb5486c375
6
.bazelrc
6
.bazelrc
@ -90,9 +90,9 @@ common:macos --repo_env=LLVM_VERSION=19
|
||||
|
||||
# Pin down the Microsoft Visual compiler. If you would like to use
|
||||
# the default compiler version installed in this host, comment the line.
|
||||
common:windows --repo_env=BAZEL_VS="C:/Program Files/Microsoft Visual Studio/2022/Professional"
|
||||
common:windows --repo_env=BAZEL_VC="C:/Program Files/Microsoft Visual Studio/2022/Professional/VC"
|
||||
common:windows --repo_env=BAZEL_VC_FULL_VERSION=14.31.31103
|
||||
common:windows --repo_env=BAZEL_VS="C:/Program Files/Microsoft Visual Studio/2022.14/Professional"
|
||||
common:windows --repo_env=BAZEL_VC="C:/Program Files/Microsoft Visual Studio/2022.14/Professional/VC"
|
||||
common:windows --repo_env=BAZEL_VC_FULL_VERSION=14.44.35207
|
||||
|
||||
# Default the Visual C Redistribution to v14.3 for Windows installer.
|
||||
common:windows --repo_env=MONGO_VC_REDIST_FULL_VERSION=v143
|
||||
|
||||
@ -1616,6 +1616,19 @@ def _impl(ctx):
|
||||
],
|
||||
)
|
||||
|
||||
disable_warnings_for_third_party_libraries_msvc_feature = feature(
|
||||
name = "disable_warnings_for_third_party_libraries_msvc",
|
||||
enabled = True,
|
||||
flag_sets = [
|
||||
flag_set(
|
||||
actions = all_compile_actions,
|
||||
flag_groups = [flag_group(flags = [
|
||||
"/wd5286", # implicit conversion from enum type
|
||||
])],
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
features = [
|
||||
no_legacy_features_feature,
|
||||
nologo_feature,
|
||||
@ -1652,6 +1665,7 @@ def _impl(ctx):
|
||||
disable_assertions_feature,
|
||||
determinism_feature,
|
||||
treat_warnings_as_errors_feature,
|
||||
disable_warnings_for_third_party_libraries_msvc_feature,
|
||||
smaller_binary_feature,
|
||||
remove_unreferenced_code_feature,
|
||||
ignore_noisy_warnings_feature,
|
||||
|
||||
@ -323,21 +323,22 @@ std::unique_ptr<Pipeline> createOplogFetchingPipelineForResharding(
|
||||
// Filter out anything inside of an `applyOps` specifically destined for another shard. This
|
||||
// ensures zone restrictions are obeyed. Data will never be sent to a shard that it isn't meant
|
||||
// to end up on.
|
||||
// Switched away from init lists because of MSVC bug found in SERVER-116297:
|
||||
// https://developercommunity.visualstudio.com/t/MSVC-1444-v143-extreme-compiler-memor/11028472
|
||||
stages.emplace_back(DocumentSourceAddFields::create(
|
||||
Doc{{"o.applyOps",
|
||||
Doc{{"$cond",
|
||||
Doc{{"if", Doc{{"$eq", Arr{V{"$op"_sd}, V{"c"_sd}}}}},
|
||||
{"then",
|
||||
Doc{{"$filter",
|
||||
Doc{{"input", "$o.applyOps"_sd},
|
||||
{"cond",
|
||||
Doc{{"$and",
|
||||
Arr{V{Doc{{"$eq", Arr{V{"$$this.ui"_sd}, V{collUUID}}}}},
|
||||
V{Doc{{"$eq",
|
||||
Arr{V{"$$this.destinedRecipient"_sd},
|
||||
V{recipientShard.toString()}}}}}}}}}}}}},
|
||||
{"else", "$o.applyOps"_sd}}}}}}
|
||||
.toBson(),
|
||||
BSON("o.applyOps" << BSON(
|
||||
"$cond" << BSON(
|
||||
"if" << BSON("$eq" << BSON_ARRAY("$op" << "c")) << "then"
|
||||
<< BSON("$filter" << BSON(
|
||||
"input"
|
||||
<< "$o.applyOps"
|
||||
<< "cond"
|
||||
<< BSON("$and" << BSON_ARRAY(
|
||||
BSON("$eq" << BSON_ARRAY("$$this.ui" << collUUID))
|
||||
<< BSON("$eq" << BSON_ARRAY(
|
||||
"$$this.destinedRecipient"
|
||||
<< recipientShard.toString()))))))
|
||||
<< "else" << "$o.applyOps"))),
|
||||
expCtx));
|
||||
|
||||
return Pipeline::create(std::move(stages), expCtx);
|
||||
|
||||
@ -79,13 +79,12 @@ TEST_F(SourceLocationTest, GlobalVariable) {
|
||||
}
|
||||
|
||||
/*
|
||||
* The MSVC version we're dealing with right now is 14.31.31103 -
|
||||
* "Visual Studio 2019 - 14.30". It gets current source location
|
||||
* The MSVC version we're dealing with right now is 14.44.35207 -
|
||||
* "Visual Studio 2022 - 17.14.20". It gets current source location
|
||||
* wrong in some ways. These tests confirm its incorrect behavior.
|
||||
* This condition can be adjusted when we upgrade to a better MSVC.
|
||||
* XCode has the same problem.
|
||||
*/
|
||||
#if defined(_MSC_VER) || defined(__apple_build_version__)
|
||||
#if defined(_MSC_VER)
|
||||
constexpr bool wrongLocation = true;
|
||||
#else
|
||||
constexpr bool wrongLocation = false;
|
||||
@ -103,7 +102,6 @@ TEST_F(SourceLocationTest, DefaultStructMember) {
|
||||
ASSERT_EQ(o.loc.line(), wrongLocation ? o.memberLine : o.ctorLine);
|
||||
}
|
||||
|
||||
int someFunctionSourceLine = __LINE__ + 1;
|
||||
SourceLocation someFunction(SourceLocation loc = MONGO_SOURCE_LOCATION()) {
|
||||
return loc;
|
||||
}
|
||||
@ -112,11 +110,10 @@ TEST_F(SourceLocationTest, FunctionReportsCaller) {
|
||||
auto reported = someFunction().line();
|
||||
auto callSiteLine = __LINE__ - 1;
|
||||
// Some compilers incorrectly choose the function source line.
|
||||
ASSERT_EQ(reported, wrongLocation ? someFunctionSourceLine : callSiteLine);
|
||||
ASSERT_EQ(reported, callSiteLine);
|
||||
}
|
||||
|
||||
struct SomeClass {
|
||||
static constexpr int ctorSiteLine = __LINE__ + 1;
|
||||
explicit SomeClass(SourceLocation loc = MONGO_SOURCE_LOCATION()) : loc{loc} {}
|
||||
SourceLocation loc;
|
||||
};
|
||||
@ -125,7 +122,7 @@ TEST_F(SourceLocationTest, ConstructorReportsCaller) {
|
||||
auto reported = SomeClass{}.loc.line();
|
||||
auto callSiteLine = __LINE__ - 1;
|
||||
// Some compilers incorrectly choose the ctor source line.
|
||||
ASSERT_EQ(reported, wrongLocation ? SomeClass::ctorSiteLine : callSiteLine);
|
||||
ASSERT_EQ(reported, callSiteLine);
|
||||
}
|
||||
|
||||
#define CALL_MONGO_SOURCE_LOCATION() MONGO_SOURCE_LOCATION()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user