summaryrefslogtreecommitdiff
path: root/src/mongo/db/SConscript
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-05-01 11:23:14 -0400
committerAndrew Morrow <acm@mongodb.com>2015-05-06 15:47:23 -0400
commit88e74fc8c8d5c33d47d838ab3cc2d02dd06c9b57 (patch)
treefeb52042550463936bd0770b301bec423639dc54 /src/mongo/db/SConscript
parent08d5bf44e8ffbb561d08c8e0e4d2cc923944cd0a (diff)
downloadmongo-88e74fc8c8d5c33d47d838ab3cc2d02dd06c9b57.tar.gz
SERVER-9666 Push serveronly library into db directory
Diffstat (limited to 'src/mongo/db/SConscript')
-rw-r--r--src/mongo/db/SConscript202
1 files changed, 201 insertions, 1 deletions
diff --git a/src/mongo/db/SConscript b/src/mongo/db/SConscript
index 918307c1ae2..f2b76b32215 100644
--- a/src/mongo/db/SConscript
+++ b/src/mongo/db/SConscript
@@ -1,6 +1,8 @@
# -*- mode: python -*-
Import("env")
+Import("has_option")
+Import("wiredtiger")
env.SConscript(
dirs=[
@@ -374,7 +376,7 @@ env.Library(
'$BUILD_DIR/mongo/db/coredb',
'$BUILD_DIR/mongo/coreserver',
'$BUILD_DIR/mongo/mongocommon',
- '$BUILD_DIR/mongo/serveronly',
+ '$BUILD_DIR/mongo/db/serveronly',
'$BUILD_DIR/mongo/util/options_parser/options_parser_init',
'server_options',
],
@@ -477,3 +479,201 @@ coredbEnv.Library(
'startup_warnings_common',
],
)
+
+
+# mongod files - also files used in tools. present in dbtests, but not in mongos and not in client
+# libs.
+serverOnlyFiles = [
+ "background.cpp",
+ "catalog/apply_ops.cpp",
+ "catalog/capped_utils.cpp",
+ "catalog/coll_mod.cpp",
+ "catalog/collection.cpp",
+ "catalog/collection_compact.cpp",
+ "catalog/collection_info_cache.cpp",
+ "catalog/create_collection.cpp",
+ "catalog/cursor_manager.cpp",
+ "catalog/database.cpp",
+ "catalog/database_holder.cpp",
+ "catalog/drop_collection.cpp",
+ "catalog/drop_database.cpp",
+ "catalog/drop_indexes.cpp",
+ "catalog/index_catalog.cpp",
+ "catalog/index_catalog_entry.cpp",
+ "catalog/index_create.cpp",
+ "catalog/rename_collection.cpp",
+ "clientcursor.cpp",
+ "cloner.cpp",
+ "commands/apply_ops.cpp",
+ "commands/cleanup_orphaned_cmd.cpp",
+ "commands/clone.cpp",
+ "commands/clone_collection.cpp",
+ "commands/collection_to_capped.cpp",
+ "commands/compact.cpp",
+ "commands/copydb.cpp",
+ "commands/copydb_start_commands.cpp",
+ "commands/count.cpp",
+ "commands/create_indexes.cpp",
+ "commands/current_op.cpp",
+ "commands/cursor_responses.cpp",
+ "commands/dbhash.cpp",
+ "commands/distinct.cpp",
+ "commands/drop_indexes.cpp",
+ "commands/explain_cmd.cpp",
+ "commands/find_and_modify.cpp",
+ "commands/find_cmd.cpp",
+ "commands/fsync.cpp",
+ "commands/geo_near_cmd.cpp",
+ "commands/get_last_error.cpp",
+ "commands/getmore_cmd.cpp",
+ "commands/group.cpp",
+ "commands/index_filter_commands.cpp",
+ "commands/kill_op.cpp",
+ "commands/list_collections.cpp",
+ "commands/list_databases.cpp",
+ "commands/list_indexes.cpp",
+ "commands/merge_chunks_cmd.cpp",
+ "commands/mr.cpp",
+ "commands/oplog_note.cpp",
+ "commands/parallel_collection_scan.cpp",
+ "commands/pipeline_command.cpp",
+ "commands/plan_cache_commands.cpp",
+ "commands/rename_collection.cpp",
+ "commands/repair_cursor.cpp",
+ "commands/test_commands.cpp",
+ "commands/top_command.cpp",
+ "commands/touch.cpp",
+ "commands/validate.cpp",
+ "commands/write_commands/batch_executor.cpp",
+ "commands/write_commands/write_commands.cpp",
+ "commands/writeback_compatibility_shim.cpp",
+ "db_raii.cpp",
+ "dbcommands.cpp",
+ "dbdirectclient.cpp",
+ "dbeval.cpp",
+ "dbhelpers.cpp",
+ "driverHelpers.cpp",
+ "geo/haystack.cpp",
+ "index/2d_access_method.cpp",
+ "index/btree_access_method.cpp",
+ "index/fts_access_method.cpp",
+ "index/hash_access_method.cpp",
+ "index/haystack_access_method.cpp",
+ "index/index_access_method.cpp",
+ "index/s2_access_method.cpp",
+ "index_builder.cpp",
+ "index_legacy.cpp",
+ "index_rebuilder.cpp",
+ "instance.cpp",
+ "introspect.cpp",
+ "matcher/expression_where.cpp",
+ "op_observer.cpp",
+ "operation_context_impl.cpp",
+ "ops/delete.cpp",
+ "ops/insert.cpp",
+ "ops/parsed_delete.cpp",
+ "ops/parsed_update.cpp",
+ "ops/update.cpp",
+ "ops/update_lifecycle_impl.cpp",
+ "ops/update_result.cpp",
+ "pipeline/document_source_cursor.cpp",
+ "pipeline/pipeline_d.cpp",
+ "prefetch.cpp",
+ "range_deleter_db_env.cpp",
+ "range_deleter_service.cpp",
+ "repair_database.cpp",
+ "repl/bgsync.cpp",
+ "repl/initial_sync.cpp",
+ "repl/master_slave.cpp",
+ "repl/minvalid.cpp",
+ "repl/oplog.cpp",
+ "repl/oplogreader.cpp",
+ "repl/replication_coordinator_external_state_impl.cpp",
+ "repl/replication_info.cpp",
+ "repl/resync.cpp",
+ "repl/rs_initialsync.cpp",
+ "repl/rs_rollback.cpp",
+ "repl/rs_sync.cpp",
+ "repl/sync.cpp",
+ "repl/sync_source_feedback.cpp",
+ "repl/sync_tail.cpp",
+ "service_context_d.cpp",
+ "stats/fill_locker_info.cpp",
+ "stats/lock_server_status_section.cpp",
+ "stats/range_deleter_server_status.cpp",
+ "stats/snapshots.cpp",
+ "storage/storage_init.cpp",
+ "storage_options.cpp",
+ "ttl.cpp",
+ "write_concern.cpp",
+]
+
+if has_option('use-cpu-profiler'):
+ serverOnlyFiles.append('db/commands/cpuprofile.cpp')
+ env.Append(LIBS=['unwind'])
+ # If we are building with our internal gperftools, add the necessary include path.
+ #
+ # NOTE: This is pretty bad because it will spam this include path into many files that
+ # don't require it, but because of the way things are currently set up, it is not easy to
+ # scope it more narrowly. Better would be if the commands were a library, and could be
+ # conditionally made to depend on this file, as a library and then we could easily scope
+ # just to this file.
+ env.InjectThirdPartyIncludePaths('tcmalloc')
+
+serveronlyEnv = env.Clone()
+serveronlyEnv.InjectThirdPartyIncludePaths(libraries=['snappy'])
+serveronlyLibdeps = [
+ "$BUILD_DIR/mongo/client/parallel",
+ "$BUILD_DIR/mongo/s/batch_write_types",
+ "$BUILD_DIR/mongo/s/catalog/legacy/catalog_manager_legacy",
+ "$BUILD_DIR/mongo/s/client/sharding_connection_hook",
+ "$BUILD_DIR/mongo/s/coreshard",
+ "$BUILD_DIR/mongo/s/metadata",
+ "$BUILD_DIR/mongo/s/serveronly",
+ "$BUILD_DIR/mongo/scripting/scripting_server",
+ "$BUILD_DIR/mongo/util/elapsed_tracker",
+ "$BUILD_DIR/mongo/util/mmap",
+ "$BUILD_DIR/third_party/shim_snappy",
+ "auth/authmongod",
+ "catalog/collection_options",
+ "catalog/index_key_validate",
+ "common",
+ "concurrency/lock_manager",
+ "concurrency/write_conflict_exception",
+ "curop",
+ "exec/exec",
+ "exec/working_set",
+ "fts/ftsmongod",
+ "global_timestamp",
+ "index/index_descriptor",
+ "ops/update_driver",
+ "query/query",
+ "range_deleter",
+ "repl/network_interface_impl",
+ "repl/repl_coordinator_global",
+ "repl/repl_coordinator_impl",
+ "repl/repl_settings",
+ "repl/replication_executor",
+ "repl/replication_executor",
+ "repl/replset_commands",
+ "repl/rslog",
+ "repl/topology_coordinator_impl",
+ "startup_warnings_mongod",
+ "stats/top",
+ "storage/devnull/storage_devnull",
+ "storage/in_memory/storage_in_memory",
+ "storage/mmap_v1/storage_mmapv1",
+ "storage/storage_engine_lock_file",
+ "storage/storage_engine_metadata",
+ "update_index_data",
+]
+
+if wiredtiger:
+ serveronlyLibdeps.append('storage/wiredtiger/storage_wiredtiger')
+ serveronlyLibdeps.append('$BUILD_DIR/third_party/shim_wiredtiger')
+
+serveronlyEnv.Library(
+ target="serveronly",
+ source=serverOnlyFiles,
+ LIBDEPS=serveronlyLibdeps,
+)