summaryrefslogtreecommitdiff
path: root/src/mongo/embedded/mongoc_embedded
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2018-10-17 22:21:05 -0400
committerAndrew Morrow <acm@mongodb.com>2018-10-30 13:01:30 -0400
commit6d475fdb5a76acab760ce4b6709b60a4c8c9aec6 (patch)
treeb0690e155382de9115a6b8b2daa36da0cef4e5ae /src/mongo/embedded/mongoc_embedded
parent27d6f6977113551e0e3444b4f76c646d94e75a49 (diff)
downloadmongo-6d475fdb5a76acab760ce4b6709b60a4c8c9aec6.tar.gz
SERVER-37488 SERVER-37596 Manage debug info and symbol maps info for embedded builds
Diffstat (limited to 'src/mongo/embedded/mongoc_embedded')
-rw-r--r--src/mongo/embedded/mongoc_embedded/SConscript26
-rw-r--r--src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in3
2 files changed, 24 insertions, 5 deletions
diff --git a/src/mongo/embedded/mongoc_embedded/SConscript b/src/mongo/embedded/mongoc_embedded/SConscript
index 2bccef55ee3..63633e8220a 100644
--- a/src/mongo/embedded/mongoc_embedded/SConscript
+++ b/src/mongo/embedded/mongoc_embedded/SConscript
@@ -63,7 +63,7 @@ if mongocEmbeddedEnv.TargetOSIs('darwin'):
],
)
-mongocEmbeddedEnv.Library(
+mongocEmbeddedTargets = mongocEmbeddedEnv.Library(
target='mongoc_embedded',
source=[
'mongoc_embedded.cpp',
@@ -121,8 +121,6 @@ if get_option('link-model') != 'dynamic-sdk':
if get_option('link-model') != 'dynamic-sdk' or get_option('install-mode') != 'hygienic' or not env.TargetOSIs('darwin') or env.TargetOSIs('macOS'):
Return()
-installHeaderRoot = env.Dir('$INSTALL_DIR/include/mongoc_embedded/v1/mongoc_embedded')
-
frameworkDir = env.Dir('$INSTALL_DIR/Frameworks/mongoc_embedded.framework')
env.Alias('install-embedded-dev', frameworkDir)
@@ -143,7 +141,7 @@ env.Install(
env.Install(
target=frameworkDir.Dir('Headers'),
- source=installHeaderRoot.File('mongoc_embedded.h'),
+ source=env.File('mongoc_embedded.h'),
)
env.InstallAs(
@@ -170,13 +168,31 @@ env.Install(
mongocEmbeddedFwLib = env.InstallAs(
target=frameworkDir.File('mongoc_embedded'),
- source='$INSTALL_DIR/lib/libmongoc_embedded.dylib',
+ source=mongocEmbeddedTargets[0],
)
env.AddPostAction(
files=mongocEmbeddedFwLib,
action=[
+ "install_name_tool -delete_rpath @loader_path/../lib $TARGET",
"install_name_tool -id @rpath/mongoc_embedded.framework/mongoc_embedded $TARGET",
"install_name_tool -change @rpath/libmongo_embedded.dylib @rpath/mongo_embedded.framework/mongo_embedded $TARGET",
],
)
+
+mongocEmbeddedDSYM = getattr(mongocEmbeddedTargets[0].attributes, "separate_debug_file", None)
+if mongocEmbeddedDSYM:
+ frameworkDSYMDir = '$INSTALL_DIR/Frameworks/mongoc_embedded.framework.dSYM'
+ env.Alias('install-embedded-dev', frameworkDSYMDir)
+
+ env.InstallAs(
+ target=frameworkDSYMDir,
+ source=mongocEmbeddedDSYM,
+ )
+
+mongocEmbeddedBCSymbolMap = getattr(mongocEmbeddedTargets[0].attributes, "bcsymbolmap_file", None)
+if mongocEmbeddedBCSymbolMap:
+ env.Install(
+ target=frameworkDir.Dir('BCSymbolMaps'),
+ source=mongocEmbeddedBCSymbolMap,
+ )
diff --git a/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in b/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in
index 3f7e9205eff..4bb7b1d892a 100644
--- a/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in
+++ b/src/mongo/embedded/mongoc_embedded/mongoc_embedded.podspec.in
@@ -26,4 +26,7 @@ Pod::Spec.new do |s|
s.dependency "mongo_embedded", "~> 4.0"
s.dependency "mongo-c-driver", "~> 1.13"
+ # See notes in mongo_embedded.podspec.in.
+ s.preserve_path = '**/*.bcsymbolmap'
+
end