source: git/dyn_modules/syzextra/SConstruct @ 9e24ef

fieker-DuValspielwiese
Last change on this file since 9e24ef was 5fdf7a, checked in by Max Horn <max@…>, 11 years ago
Replace --no-{rtti,exceptions} by -fno-{rtti,exceptions} This improves compatibility with clang. Moreover, to the best of my knowledge, the --no-* variants are undocumented to start with. At least the GCC manuals for all versions from 2.95.3 till 4.7.2 only list the -fno-* variants, as far as I could tell.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1# Emacs edit mode for this file is -*- python -*-
2
3from SCons.Defaults import SharedCheck, ProgScan
4from SCons.Script.SConscript import SConsEnvironment
5
6MODNAME = 'syzextra'
7SRCS = ["mod_main.cc", "DebugPrint.cc", "myNF.cc"]
8
9env = Environment()
10
11import os
12SINGULAR_HOME="./../.."
13
14SING_INCLUDES=[SINGULAR_HOME, SINGULAR_HOME+"/omalloc"]
15# , SINGULAR_HOME+"/factory"
16
17
18#env.SharedObject(target = 'mod_main.o', source = 'mod_main.cc')
19
20CXXTEMPLFLAGS = "-fno-implicit-templates -fno-exceptions"
21
22if env ['PLATFORM'] == "darwin":
23    MACOSXMODULEFLAGS = '-twolevel_namespace -weak_reference_mismatches weak -undefined dynamic_lookup'
24else:
25    MACOSXMODULEFLAGS = ''
26## '-flat_namespace -undefined suppress'
27
28BUNDLETEMPFLAGS = '$LDMODULEFLAGS ' + MACOSXMODULEFLAGS
29
30### for the use with "scons debug=1"
31if ARGUMENTS.get('debug', 0):
32    ### Works with Singularg only!
33    syzextra_debug_if = env.LoadableModule( MODNAME + '_g',
34        SRCS,
35        SHLIBPREFIX="",
36        LDMODULESUFFIX=".sog",
37        SHLIBSUFFIX = ".sog",
38        CPPPATH = SING_INCLUDES,
39        CXXFLAGS = "-g -Wextra -Winline -Wall -pedantic -Wno-long-long " + CXXTEMPLFLAGS,
40        LDMODULEFLAGS = BUNDLETEMPFLAGS,
41        LIBS=[])
42    Default(syzextra_debug_if)
43else:
44    ### Works with any Singular
45    syzextra_if = env.LoadableModule(MODNAME,
46        SRCS,
47        SHLIBPREFIX="",
48        LDMODULESUFFIX=".so",
49        SHLIBSUFFIX = ".so",
50        CPPPATH = SING_INCLUDES,
51        CPPDEFINES = ["NDEBUG", "OM_NDEBUG"],
52        CXXFLAGS = "-O3 -fomit-frame-pointer -fno-rtti " + CXXTEMPLFLAGS,
53        CCFLAGS="-O3 -fomit-frame-pointer ",
54        LDMODULEFLAGS = BUNDLETEMPFLAGS,
55        LIBS=[])
56    Default(syzextra_if)
57
58
59
60### clean with "scons -c ."
Note: See TracBrowser for help on using the repository browser.