'c99': '-std=c99',
},
'msvc' : {
- 'debuggable' : ['/Od', '/Zi', '/MTd'],
- 'linker-debuggable' : ['/DEBUG' ],
- 'nondebuggable' : [ '/MD', '-DNDEBUG' ],
+ 'debuggable' : ['/DDEBUG', '/Od', '/Zi', '/MDd', '/Gd', '/EHsc'],
+ 'linker-debuggable' : ['/DEBUG', '/INCREMENTAL' ],
+ 'nondebuggable' : ['/DNDEBUG', '/Ob1', '/MD', '/Gd', '/EHsc'],
'profile' : '',
+ 'sse' : '/arch:SSE',
'silence-unused-arguments' : '',
'sse' : '',
- 'fpmath-see' : '',
+ 'fpmath-sse' : '',
'xmmintrinsics' : '',
'pipe' : '',
- 'full-optimization' : '',
+ 'full-optimization' : '/O2',
'no-frame-pointer' : '',
'fast-math' : '',
'strength-reduce' : '',
'c-strict' : '',
'cxx-strict' : '',
'strict' : '',
- 'c99': '-TP',
+ 'c99': '/TP',
},
}
clang_dict['extra-cxx-warnings'] = [ '-Woverloaded-virtual', '-Wno-mismatched-tags' ]
clang_dict['cxx-strict'] = [ '-ansi', '-Wnon-virtual-dtor', '-Woverloaded-virtual', '-fstrict-overflow' ]
clang_dict['strict'] = ['-Wall', '-Wcast-align', '-Wextra', '-Wwrite-strings' ]
+clang_dict['generic-x86'] = [ '-arch', 'i386' ]
compiler_flags_dictionaries['clang'] = clang_dict;
clang_darwin_dict = compiler_flags_dictionaries['clang'].copy();
msg = 'Checking for clang')
if is_clang:
- if platform == darwin:
+ if platform == 'darwin':
compiler_name = 'clang-darwin'
else:
compiler_name = 'clang'
- elif conf.env['CC'][0].find ('msvc') != -1:
+ elif conf.env['MSVC_COMPILER']:
compiler_name = 'msvc'
else:
if platform == 'darwin':
else:
compiler_name = 'gcc'
- print "Compiler name is ", compiler_name, "\n"
-
flags_dict = compiler_flags_dictionaries[compiler_name]
autowaf.set_basic_compiler_flags (conf,flags_dict)
break
if prepend_opt_flags:
- optimization_flags[:0] = [ flags_dict['full-optimization'] ]
+ optimization_flags[:0] = flags_dict['full-optimization']
if opt.debug_symbols:
- optimization_flags += [ flags_dict['debuggable'] ]
+ optimization_flags += flags_dict['debuggable']
if opt.stl_debug:
cxx_flags.append("-D_GLIBCXX_DEBUG")
help='Compile with support for linuxVST plugins')
opt.add_option('--no-lxvst', action='store_false', dest='lxvst',
help='Compile without support for linuxVST plugins')
+ opt.add_option('--no-lrdf', action='store_true', dest='no_lrdf',
+ help='Compile without support for LRDF LADSPA data even if present')
opt.add_option('--nls', action='store_true', default=True, dest='nls',
help='Enable i18n (native language support) (default)')
opt.add_option('--no-nls', action='store_false', dest='nls')
conf.env['MSVC_TARGETS'] = ['x64']
conf.load('msvc')
+ if Options.options.debug:
+ # Nuke user CFLAGS/CXXFLAGS if debug is set (they likely contain -O3, NDEBUG, etc)
+ conf.env['CFLAGS'] = []
+ conf.env['CXXFLAGS'] = []
+
conf.env['VERSION'] = VERSION
conf.env['MAJOR'] = MAJOR
conf.env['MINOR'] = MINOR
# executing a test program is n/a when cross-compiling
if Options.options.dist_target != 'mingw':
- conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
+ if Options.options.dist_target != 'msvc':
+ conf.check_cc(function_name='dlopen', header_name='dlfcn.h', lib='dl', uselib_store='DL')
conf.check_cxx(fragment = "#include <boost/version.hpp>\nint main(void) { return (BOOST_VERSION >= 103900 ? 0 : 1); }\n",
execute = "1",
mandatory = True,