summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-11-26 17:13:49 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-26 22:40:31 +0000
commitb5309fcf9cd32183b52470b0e996d08bd02ffb35 (patch)
treed49ead20280a2f484d000c786488a28c58ce9483 /src
parent0b3181433449eb7d68e97120d2dbb9f317270b1a (diff)
downloadmongo-b5309fcf9cd32183b52470b0e996d08bd02ffb35.tar.gz
SERVER-60694 fix xcode 12.4 builder dyld limit startup issue
This reduces the size of the link graph by inlining validateViewOnNotEmpty() and removing dependencies on commands/create_command.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/db/SConscript1
-rw-r--r--src/mongo/db/auth/SConscript1
-rw-r--r--src/mongo/db/commands/SConscript1
-rw-r--r--src/mongo/db/commands/create_command_validation.cpp38
-rw-r--r--src/mongo/db/commands/create_command_validation.h6
5 files changed, 5 insertions, 42 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index bdc422bf5b4..11975546ca0 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -614,7 +614,6 @@ env.Library(
],
LIBDEPS=[
'$BUILD_DIR/mongo/db/catalog/collection_options',
- '$BUILD_DIR/mongo/db/commands/create_command',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/auth/authprivilege',
diff --git a/src/mongo/db/auth/SConscript b/src/mongo/db/auth/SConscript
index d455ef5333d..844b1b76db7 100644
--- a/src/mongo/db/auth/SConscript
+++ b/src/mongo/db/auth/SConscript
@@ -207,7 +207,6 @@ env.Library(
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/db/api_parameters',
'$BUILD_DIR/mongo/db/audit', # audit:logLogout in AuthZSession.
- '$BUILD_DIR/mongo/db/commands/create_command',
'$BUILD_DIR/mongo/db/stats/counters',
'$BUILD_DIR/mongo/idl/server_parameter',
'$BUILD_DIR/mongo/util/caching',
diff --git a/src/mongo/db/commands/SConscript b/src/mongo/db/commands/SConscript
index d09aa530822..25508979cc1 100644
--- a/src/mongo/db/commands/SConscript
+++ b/src/mongo/db/commands/SConscript
@@ -271,7 +271,6 @@ env.Library(
target='create_command',
source=[
'create.idl',
- 'create_command_validation.cpp',
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/base',
diff --git a/src/mongo/db/commands/create_command_validation.cpp b/src/mongo/db/commands/create_command_validation.cpp
deleted file mode 100644
index ed4404e6585..00000000000
--- a/src/mongo/db/commands/create_command_validation.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (C) 2020-present MongoDB, Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the Server Side Public License, version 1,
- * as published by MongoDB, Inc.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * Server Side Public License for more details.
- *
- * You should have received a copy of the Server Side Public License
- * along with this program. If not, see
- * <http://www.mongodb.com/licensing/server-side-public-license>.
- *
- * As a special exception, the copyright holders give permission to link the
- * code of portions of this program with the OpenSSL library under certain
- * conditions as described in each individual source file and distribute
- * linked combinations including the program with the OpenSSL library. You
- * must comply with the Server Side Public License in all respects for
- * all of the code used other than as permitted herein. If you modify file(s)
- * with this exception, you may extend this exception to your version of the
- * file(s), but you are not obligated to do so. If you do not wish to do so,
- * delete this exception statement from your version. If you delete this
- * exception statement from all source files in the program, then also delete
- * it in the license file.
- */
-
-#include "mongo/db/commands/create_command_validation.h"
-
-namespace mongo::create_command_validation {
-Status validateViewOnNotEmpty(const std::string& viewOn) {
- return viewOn.empty()
- ? Status(ErrorCodes::BadValue, str::stream() << "'viewOn' cannot be empty")
- : Status::OK();
-}
-} // namespace mongo::create_command_validation
diff --git a/src/mongo/db/commands/create_command_validation.h b/src/mongo/db/commands/create_command_validation.h
index 1cdfb78cc02..26dcdc5e7de 100644
--- a/src/mongo/db/commands/create_command_validation.h
+++ b/src/mongo/db/commands/create_command_validation.h
@@ -33,5 +33,9 @@
#include "mongo/bson/bsonobj.h"
namespace mongo::create_command_validation {
-Status validateViewOnNotEmpty(const std::string& viewOn);
+inline Status validateViewOnNotEmpty(const std::string& viewOn) {
+ return viewOn.empty()
+ ? Status(ErrorCodes::BadValue, str::stream() << "'viewOn' cannot be empty")
+ : Status::OK();
+}
} // namespace mongo::create_command_validation