about summary refs log tree commit diff homepage
path: root/scripts
diff options
context:
space:
mode:
authorFrank Busse <bb0xfb@gmail.com>2018-11-01 14:42:59 +0000
committerCristian Cadar <c.cadar@imperial.ac.uk>2019-03-05 10:42:39 +0000
commitd3f73596362ed39b1aceed6da18044fad252806f (patch)
tree03a5fd2033391b0b0076d7c6e9107ed636bb7fb8 /scripts
parent46463adc26e29075c4cf87cc8f51d5a191929938 (diff)
downloadklee-d3f73596362ed39b1aceed6da18044fad252806f.tar.gz
remove klee-clang, use wllvm/gllvm instead
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/klee-clang74
1 files changed, 0 insertions, 74 deletions
diff --git a/scripts/klee-clang b/scripts/klee-clang
deleted file mode 100755
index 7b98a97d..00000000
--- a/scripts/klee-clang
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/env python
-
-# ===-- klee-clang --------------------------------------------------------===##
-# 
-#                      The KLEE Symbolic Virtual Machine
-# 
-#  This file is distributed under the University of Illinois Open Source
-#  License. See LICENSE.TXT for details.
-# 
-# ===----------------------------------------------------------------------===##
-
-import os, sys
-import subprocess
-import re
-
-
-def isLinkCommand():
-    # Look for '-Wl,' as a signal that we are calling the linker. What a hack.
-    for arg in sys.argv:
-        if arg.startswith('-Wl,'):
-            return True
-
-link_exact_filter = ['-g', '-W', '-O', '-D', '-f',
-                     '-fnested-functions', '-pthread', '-fPIC', '-g',
-                     '-pedantic', '-shared', '-rdynamic', '-nodefaultlibs']
-
-link_regexp_filter_patts = ['^-Wl.*', '^-l.*', '^-W.*', '^-O\d', '^-gg.*',
-                            '^-mtune.*', '^-std=c.*', '^-f.*frame-pointer',
-                            '^-fvisibility.*']
-link_regexp_filters = []
-for patt in link_regexp_filter_patts:
-    prog = re.compile(patt)
-    link_regexp_filters.append(prog)
-
-
-def main():
-    llvm_path = subprocess.Popen(["llvm-config", "--bindir"], stdout=subprocess.PIPE).communicate()[0].strip()
-
-    if not isLinkCommand():
-        os.execvp(llvm_path+"/clang", ["clang", "-emit-llvm", "-c"] + sys.argv[1:])
-        return 1
-
-    # Otherwise, strip out arguments that llvm-ld doesn't understand. I don't
-    # want my previous explicit declaration of hackyness to imply that this bit
-    # of code here is not also a complete and total hack, it is.
-    args = sys.argv[1:]
-    linkArgs = []
-    for a in args:
-        a = a.strip()
-        if a in link_exact_filter:
-            continue
-
-        match = False
-        for filt in link_regexp_filters:
-            # print "matching %s on filter" % a
-            if filt.match(a):
-                # print "MATCHED %s" % a
-                match = True
-                break
-
-        if match:
-            continue
-
-        if a in linkArgs:
-            continue
-
-        linkArgs.append(a)
-
-    os.execvp(llvm_path+"/llvm-link", [llvm_path+"/llvm-link"] + linkArgs)
-    return 1
-
-
-if __name__ == '__main__':
-    main()