summaryrefslogtreecommitdiff
path: root/site_scons
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2021-02-17 10:29:28 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-02-17 16:07:19 +0000
commit13e8d7c56b5105a318643b9e3e93d4a1058dcb8e (patch)
tree74367800552dbb48eee6d7b1f5002914b2eb535b /site_scons
parent2863ffba5cfe923c0e0661bc7a1b9d916c696b27 (diff)
downloadmongo-13e8d7c56b5105a318643b9e3e93d4a1058dcb8e.tar.gz
Revert "SERVER-45236 Eliminate need to reiterate compile flags on the link line"
This reverts commit 6674514dfcc5b3ec4e80c2b727c8d7f9f6f6e86f.
Diffstat (limited to 'site_scons')
-rw-r--r--site_scons/site_tools/mongo_libfuzzer.py3
-rw-r--r--site_scons/site_tools/smartlink_cflags.py48
2 files changed, 2 insertions, 49 deletions
diff --git a/site_scons/site_tools/mongo_libfuzzer.py b/site_scons/site_tools/mongo_libfuzzer.py
index a3718afb0b2..bcbc0412688 100644
--- a/site_scons/site_tools/mongo_libfuzzer.py
+++ b/site_scons/site_tools/mongo_libfuzzer.py
@@ -44,7 +44,8 @@ def build_cpp_libfuzzer_test(env, target, source, **kwargs):
libdeps = kwargs.get("LIBDEPS", myenv.get("LIBDEPS", [])).copy()
kwargs["LIBDEPS"] = libdeps
kwargs["INSTALL_ALIAS"] = ["tests"]
- kwargs["FSAN_DO_LINK"] = True
+ sanitizer_option = "-fsanitize=fuzzer"
+ myenv.Prepend(LINKFLAGS=[sanitizer_option])
libfuzzer_test_components = {"tests", "fuzzertests"}
if "AIB_COMPONENT" in kwargs and not kwargs["AIB_COMPONENTS"].endswith(
diff --git a/site_scons/site_tools/smartlink_cflags.py b/site_scons/site_tools/smartlink_cflags.py
deleted file mode 100644
index 6ebce3d624e..00000000000
--- a/site_scons/site_tools/smartlink_cflags.py
+++ /dev/null
@@ -1,48 +0,0 @@
-# Copyright 2020 MongoDB Inc.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# This tool adjusts the LINKFLAGS and SHLINKFLAGS so that
-# [SH]C[{C,CXX}]FLAGS are reiterated on the link line. This is
-# important for flags like -mmacosx-version-min which has effects at
-# both compile and link time. We use the CXX flags if the sources are
-# C++.
-
-from SCons.Tool.cxx import iscplusplus
-
-def _smartlink_flags(source, target, env, for_signature):
- if iscplusplus(source):
- return '$CXXFLAGS $CCFLAGS $CXXLINKFLAGS'
- return '$CFLAGS $CCFLAGS $CLINKFLAGS'
-
-def _smartshlink_flags(source, target, env, for_signature):
- if iscplusplus(source):
- return '$SHCXXFLAGS $SHCCFLAGS $SHCXXLINKFLAGS'
- return '$SHCFLAGS $SHCCFLAGS $SHCLINKFLAGS'
-
-
-def exists(env):
- return True
-
-def generate(env):
-
- if not exists(env):
- return
-
- env['SMARTLINKFLAGS'] = _smartlink_flags
- env['SMARTSHLINKFLAGS'] = _smartshlink_flags
-
- env.PrependUnique(
- LINKFLAGS=['$SMARTLINKFLAGS'],
- SHLINKFLAGS=['$SMARTSHLINKFLAGS'],
- )