-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmk_util.py.patch
36 lines (34 loc) · 1.45 KB
/
mk_util.py.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- mk_util.py 2019-07-23 18:04:32.000000000 +0200
+++ mk_util_patched_.py 2019-07-24 09:13:18.000000000 +0200
@@ -227,9 +227,13 @@
cmd = new_cmd
null = open(os.devnull, 'wb')
try:
- return subprocess.call(cmd, stdout=null, stderr=null)
- except:
+ print("Running %s" % cmd)
+ exitcode = subprocess.call(cmd)
+ print("Command %s exited with exit code %s" % (cmd, exitcode))
+ return exitcode
+ except BaseException as e:
# Failed to create process
+ print("subprocess.call(%s) raised exception %s: %s" % (cmd, type(e), e))
return 1
finally:
null.close()
@@ -2028,7 +2032,16 @@
if is_cygwin() and not(is_cygwin_mingw()):
LIBZ3 = z3linkdep
- LIBZ3 = LIBZ3 + ' ' + ' '.join(map(lambda x: '-cclib ' + x, LDFLAGS.split()))
+ escape_linker_option_fun = lambda x: '-cclib ' + x
+ if is_cygwin_mingw():
+ def escape_linker_option(x):
+ if x.startswith('-l'):
+ return '-cclib ' + x
+ else:
+ return '-cclib -link -cclib ' + x
+ escape_linker_option_fun = escape_linker_option
+
+ LIBZ3 = LIBZ3 + ' ' + ' '.join(map(escape_linker_option, LDFLAGS.split()))
if DEBUG_MODE and not(is_cygwin()):
# Some ocamlmklib's don't like -g; observed on cygwin, but may be others as well.