Skip to content

Commit 73d6b42

Browse files
committed
Deadcode and dead notes removal.
1 parent e680ba2 commit 73d6b42

File tree

2 files changed

+20
-61
lines changed

2 files changed

+20
-61
lines changed

NOTES.txt

Lines changed: 19 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,23 @@
1-
WARNING:Did not recognize the compiler flag "-m32"
2-
WARNING:Did not recognize the compiler flag "-march=i686"
3-
WARNING:Did not recognize the compiler flag "-B/home/iam/world/usr/src/lib32/usr/lib32"
4-
WARNING:Did not recognize the compiler flag "-mpreferred-stack-boundary=2"
5-
WARNING:Did not recognize the compiler flag "-mno-align-long-strings"
6-
WARNING:Did not recognize the compiler flag "-mrtd"
7-
WARNING:Did not recognize the compiler flag "-mregparm=3"
8-
WARNING:Did not recognize the compiler flag "-mstack-alignment=8"
9-
WARNING:Did not recognize the compiler flag "-mllvm"
10-
WARNING:Did not recognize the compiler flag "-inline-threshold=3"
11-
WARNING:Did not recognize the compiler flag "-enable-load-pre=false"
12-
WARNING:Did not recognize the compiler flag "-mllvm"
13-
WARNING:Did not recognize the compiler flag "-simplifycfg-dup-ret"
14-
WARNING:Did not recognize the compiler flag "-march=i386"
15-
WARNING:Did not recognize the compiler flag "cat.lo" ....
16-
WARNING:Did not recognize the compiler flag "-Ttext"
17-
WARNING:Did not recognize the compiler flag "0x600"
18-
WARNING:Did not recognize the compiler flag "-m"
19-
WARNING:Did not recognize the compiler flag "elf_i386_fbsd"
201

2+
"-m32"
3+
"-march=i686"
4+
"-B/home/iam/world/usr/src/lib32/usr/lib32"
5+
"-mpreferred-stack-boundary=2"
6+
"-mno-align-long-strings"
7+
"-mrtd"
8+
"-mregparm=3"
9+
"-mstack-alignment=8"
10+
"-mllvm"
11+
"-inline-threshold=3"
12+
"-enable-load-pre=false"
13+
"-mllvm"
14+
"-simplifycfg-dup-ret"
15+
"-march=i386"
16+
"cat.lo" ....
17+
"-Ttext"
18+
"0x600"
19+
"-m"
20+
"elf_i386_fbsd"
2121

22-
Darwin linker flags:
23-
24-
WARNING:Did not recognize the compiler flag "-dynamiclib"
25-
WARNING:Did not recognize the compiler flag "-current_version"
26-
WARNING:Did not recognize the compiler flag "2.2.2"
27-
WARNING:Did not recognize the compiler flag "-compatibility_version"
28-
WARNING:Did not recognize the compiler flag "2.2.0"
29-
30-
Attempt to attach bitcode stuff on MacOS using ld:
31-
32-
ld -r <file.o> -sectcreate __LLVM __llvm_bc <tmpfile> -o <file.o>
33-
34-
This works (it adds a new section called __llvm_bc in a new __LLVM
35-
segment), but the 'ld -r' part may have bad side effects. For example
36-
if the <file.o> is produced with -fvisibility=hidden then calling
37-
ld -r <file.o> converts the extern symbols into local symbols.
38-
39-
Workaround for now: give a warning if we see -fvisibility=hidden on
40-
the Mac.
41-
42-
43-
44-
TODO: extract-bc for MacOS
45-
46-
To extract bitcode from binaries, objects, or library files on Darwin:
47-
48-
otool -X -s __LLVM __llvm_bc yices_sat | xxd -r
49-
50-
Explanations:
51-
52-
otool -s __LLVM __llvm_bc file extracts and display the section we care about
53-
54-
flag -X removes some useless headers we don't want
55-
56-
xxd -r converts the hexdump to ASCII list of file names
5722

5823

driver/utils.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def __init__(self, inputList, exactMatches={}, patternMatches={}):
118118
'-m3dnow' : (0, ArgumentListFilter.compileUnaryCallback),
119119
'-mno-3dnow' : (0, ArgumentListFilter.compileUnaryCallback),
120120

121+
121122
# Preprocessor assertion
122123
'-A' : (1, ArgumentListFilter.compileBinaryCallback),
123124
'-D' : (1, ArgumentListFilter.compileBinaryCallback),
@@ -336,13 +337,6 @@ def linkUnaryCallback(self, flag):
336337
def compileUnaryCallback(self, flag):
337338
self.compileArgs.append(flag)
338339

339-
def darwinWarningCompileUnaryCallback(self, flag):
340-
if sys.platform.startswith('darwin'):
341-
_logger.warning('The flag "{0}" cannot be used with this tool'.format(flag))
342-
sys.exit(1)
343-
else:
344-
self.compileArgs.append(flag)
345-
346340
def darwinWarningLinkUnaryCallback(self, flag):
347341
if sys.platform.startswith('darwin'):
348342
_logger.warning('The flag "{0}" cannot be used with this tool'.format(flag))

0 commit comments

Comments
 (0)