To protect your data, the CISO officer has suggested users to enable 2FA as soon as possible.
Currently 2.7% of users enabled 2FA.

Commit 85732bf1 authored by Zixian Cai's avatar Zixian Cai
Browse files

Merge branch 'mu-rewrite' into mu-jit-2

parents f47b6279 37785fcc
......@@ -23,8 +23,8 @@ mu:test_other:
mu:test_impl_dep:
script:
- git clone https://gitlab.anu.edu.au/mu/mu-impl-ref2 && cd mu-impl-ref2
- git checkout issuemir2-uptr-hack
- sbt compile && cd cbinding && make
- git checkout master
- sbt clean && sbt compile && cd cbinding && make
- cd $MU_TEST_DIR
# tests that depend on mu-impl-ref2 go here
- $PYTEST test_ll2mu.py test_mutyper.py test_database.py test_genmu.py
\ No newline at end of file
- $PYTEST test_ll2mu.py test_mutyper.py test_database.py test_genmu.py
......@@ -186,10 +186,28 @@ index b1e1f73..b07816b 100644
libraries = ['c_file'],
library_dirs = [str(so.dirpath())]
diff --git a/rpython/translator/platform/__init__.py b/rpython/translator/platform/__init__.py
index 051668b..d44ed79 100644
index 051668b..8c158b3 100644
--- a/rpython/translator/platform/__init__.py
+++ b/rpython/translator/platform/__init__.py
@@ -212,7 +212,10 @@ class Platform(object):
@@ -92,9 +92,15 @@ class Platform(object):
if os.name == 'posix' and compilation_info is not None:
library_path = ':'.join([str(i) for i in compilation_info.library_dirs])
if sys.platform == 'darwin':
- env['DYLD_LIBRARY_PATH'] = library_path
+ if env.get('DYLD_LIBRARY_PATH'):
+ env['DYLD_LIBRARY_PATH'] += library_path + ":"
+ else:
+ env['DYLD_LIBRARY_PATH'] = library_path
else:
- env['LD_LIBRARY_PATH'] = library_path
+ if env.get('LD_LIBRARY_PATH'):
+ env['LD_LIBRARY_PATH'] += library_path + ":"
+ else:
+ env['LD_LIBRARY_PATH'] = library_path
returncode, stdout, stderr = _run_subprocess(str(executable), args,
env)
@@ -212,7 +218,10 @@ class Platform(object):
def _finish_linking(self, ofiles, eci, outputfilename, standalone):
if outputfilename is None:
......
......@@ -59,7 +59,7 @@ def test_map_type_opqptr():
DIRP = rposix.DIRP
import sys
if sys.platform.startswith('linux'):
assert ll2mu.map_type(rposix.DIRP) == mutype.MuUPtr(mutype.MU_INT64)
assert ll2mu.map_type(rposix.DIRP) == mutype.MU_VOIDP
elif sys.platform == 'darwin':
assert ll2mu.map_type(rposix.DIRP) == mutype.MuUPtr(arrayofbytes(DIRP.TO.hints['getsize']()))
......@@ -485,7 +485,7 @@ def test_malloc_varsize_raw():
ll2mu.mapped_const(10)],
rs)
muops = ll2mu.map_op(llop)
assert [op.opname for op in muops] == ['mu_binop', 'mu_binop', 'mu_ccall', 'mu_getfieldiref', 'mu_store']
assert [op.opname for op in muops] == ['mu_binop', 'mu_binop', 'mu_ccall', 'mu_convop', 'mu_getfieldiref', 'mu_store']
def test_setarrayitem():
......@@ -526,7 +526,7 @@ def test_ptr_nonzero():
rs = varof(mutype.MuRef(Stt))
res = varof(mutype.MU_INT8)
muops = ll2mu.map_op(SpaceOperation('ptr_nonzero', [rs], res))
assert [op.opname for op in muops] == ['mu_cmpop', 'mu_convop']
assert [op.opname for op in muops] == ['mu_convop', 'mu_cmpop', 'mu_convop']
def test_raw_memcopy():
ll2mu = LL2MuMapper()
......@@ -617,7 +617,7 @@ def test_malloc_array_of_void():
Constant(mutype.mu_int64(0), mutype.MU_INT64)], varof(mutype.MuUPtr(T)))
ll2mu = LL2MuMapper()
muops = ll2mu.map_op(llop)
assert len(muops) == 1
assert len(muops) == 2
assert muops[0].opname == 'mu_ccall'
assert muops[0].args[0].value._name == 'malloc'
assert muops[0].args[1].value == 8
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment