diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-12-21 16:24:18 -0500 |
---|---|---|
committer | Ramon Fernandez <ramon@mongodb.com> | 2016-07-26 21:05:37 -0400 |
commit | ffdc7c6831d82b51e9fd56f045dc77d60300f5c5 (patch) | |
tree | e37111660ebc2012246252811bf860951d853306 | |
parent | ac162ebc53af7296f7837b2f57fc0cf92c001393 (diff) | |
download | mongo-ffdc7c6831d82b51e9fd56f045dc77d60300f5c5.tar.gz |
SERVER-21820 SERVER-21830 Export endian from SConstruct for use in third_party
(cherry picked from commit 9e518d6d2d1061574f6d56223ce195f42699670b)
Conflicts:
SConstruct
-rw-r--r-- | SConstruct | 1 | ||||
-rw-r--r-- | src/third_party/snappy-1.1.2/SConscript | 7 | ||||
-rw-r--r-- | src/third_party/wiredtiger/SConscript | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index 7ab517706ac..bdafd06dd02 100644 --- a/SConstruct +++ b/SConstruct @@ -2632,6 +2632,7 @@ Export('module_sconscripts') Export("debugBuild optBuild") Export("wiredtiger") Export("mmapv1") +Export("endian") def injectMongoIncludePaths(thisEnv): thisEnv.AppendUnique(CPPPATH=['$BUILD_DIR']) diff --git a/src/third_party/snappy-1.1.2/SConscript b/src/third_party/snappy-1.1.2/SConscript index 5b405d1d141..53f946064b5 100644 --- a/src/third_party/snappy-1.1.2/SConscript +++ b/src/third_party/snappy-1.1.2/SConscript @@ -1,11 +1,16 @@ # -*- mode: python -*- Import("env") +Import("endian") + +env = env.Clone() if env.ToolchainIs('clang', 'GCC'): - env = env.Clone() env.Append(CCFLAGS=['-Wno-sign-compare', '-Wno-unused-function']) +if endian == "big": + env.Append(CPPDEFINES=['WORDS_BIGENDIAN']) + env.Library( target='snappy', source=[ diff --git a/src/third_party/wiredtiger/SConscript b/src/third_party/wiredtiger/SConscript index 6359568f0b2..a9f43aaa2ac 100644 --- a/src/third_party/wiredtiger/SConscript +++ b/src/third_party/wiredtiger/SConscript @@ -4,10 +4,14 @@ import textwrap Import("env debugBuild") Import("get_option") +Import("endian") env = env.Clone() env.InjectThirdPartyIncludePaths(libraries=['snappy', 'zlib']) +if endian == "big": + env.Append(CPPDEFINES=[('WORDS_BIGENDIAN', 1)]) + env.Append(CPPPATH=[ "src/include", ]) |