add upstream source (adch++ 2.12.1 from sourceforge)

This commit is contained in:
2020-03-22 01:45:29 -07:00
parent 3574617350
commit 2cfbcf1301
9637 changed files with 1934407 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
# This file is executed when setting up the environment for the Clang Static Analyzer.
import clang
def generate(env):
clang.generate(env)
env['CC'] = 'scan-build ' + env['CC']
env['CXX'] = 'scan-build ' + env['CXX']
def exists(env):
return env.WhereIs('scan-build') is not None and clang.exists(env)

28
src/tools/clang.py Normal file
View File

@@ -0,0 +1,28 @@
# This file is executed when setting up the environment for clang.
# Chances are very high it won't work for you! This is just a set-up for the clang 3.0 currently
# provided by Cygwin to make use of MinGW includes and generate Cygwin-free binaries.
# Feel free to modify as needed for your platform (and provide a patch? ;)).
import SCons.Tool.mingw
def generate(env):
SCons.Tool.mingw.generate(env)
prev_escape = env['ESCAPE']
env['ESCAPE'] = lambda s: prev_escape(s).replace('\\', '/')
env['CC'] = 'clang'
env['CXX'] = 'clang'
env.Append(CPPFLAGS = ['-nostdinc', '-U__llvm__', '-U__clang__', '-U__CYGWIN__', '-U__CYGWIN32__', '-U__GNUC_MINOR__', '-Wno-attributes', '-Wno-macro-redefined', '-Wno-format-invalid-specifier'])
env.Append(CPPDEFINES = ['__GNUC_MINOR__=6', # clang advertises GCC 4.2; make it look like 4.6
'_WIN32', '__MINGW32__', '__MSVCRT__', '__declspec=__declspec'])
env.Append(CPPPATH = ['C:/MinGW/lib/gcc/mingw32/4.6.2/include/c++', 'C:/MinGW/lib/gcc/mingw32/4.6.2/include/c++/mingw32', 'C:/MinGW/lib/gcc/mingw32/4.6.2/include/c++/backward', 'C:/MinGW/lib/gcc/mingw32/4.6.2/include', 'C:/MinGW/include', 'C:/MinGW/lib/gcc/mingw32/4.6.2/include-fixed'])
env['LINK'] = 'g++'
env['AR'] = 'ar'
env['RANLIB'] = 'ranlib'
def exists(env):
return env.WhereIs('clang') is not None and Scons.Tool.mingw.exists(env)