summaryrefslogtreecommitdiff
path: root/databases/mongodb70/files/patch-SConstruct
blob: a6da48e571142c8b289259e822df186218930ba1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- SConstruct.orig	2023-06-07 17:07:38 UTC
+++ SConstruct
@@ -23,7 +23,6 @@ import SCons.Script
 
 import SCons
 import SCons.Script
-from mongo_tooling_metrics.lib.top_level_metrics import SConsToolingMetrics
 from site_scons.mongo import build_profiles
 
 # This must be first, even before EnsureSConsVersion, if
@@ -1655,16 +1654,6 @@ env.AddMethod(lambda env, name, **kwargs: add_option(n
 del envDict
 env.AddMethod(lambda env, name, **kwargs: add_option(name, **kwargs), 'AddOption')
 
-# The placement of this is intentional. Here we setup an atexit method to store tooling metrics.
-# We should only register this function after env, env_vars and the parser have been properly initialized.
-SConsToolingMetrics.register_metrics(
-    utc_starttime=datetime.utcnow(),
-    artifact_dir=env.Dir('$BUILD_DIR').get_abspath(),
-    env_vars=env_vars,
-    env=env,
-    parser=_parser,
-)
-
 if get_option('build-metrics'):
     env['BUILD_METRICS_ARTIFACTS_DIR'] = '$BUILD_ROOT/$VARIANT_DIR'
     env.Tool('build_metrics')
@@ -1801,9 +1790,9 @@ if has_option('variables-help'):
     print(env_vars.GenerateHelpText(env))
     Exit(0)
 
-unknown_vars = env_vars.UnknownVariables()
-if unknown_vars:
-    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
+#unknown_vars = env_vars.UnknownVariables()
+#if unknown_vars:
+#    env.FatalError("Unknown variables specified: {0}", ", ".join(list(unknown_vars.keys())))
 
 install_actions.setup(env, get_option('install-action'))
 
@@ -3026,7 +3015,7 @@ if env.TargetOSIs('posix'):
             # If runtime hardening is requested, then build anything
             # destined for an executable with the necessary flags for PIE.
             env.AppendUnique(
-                PROGCCFLAGS=['-fPIE'],
+                PROGCCFLAGS=['-fpic'],
                 PROGLINKFLAGS=['-pie'],
             )
 
@@ -3034,7 +3023,6 @@ if env.TargetOSIs('posix'):
     env.Append(
         CCFLAGS=[
             "-fasynchronous-unwind-tables",
-            "-g2" if not env.TargetOSIs('emscripten') else "-g",
             "-Wall",
             "-Wsign-compare",
             "-Wno-unknown-pragmas",