diff options
Diffstat (limited to '')
| -rw-r--r-- | .travis.yml | 15 | ||||
| -rw-r--r-- | miasm2/jitter/llvmconvert.py | 4 |
2 files changed, 9 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml index 81e571c3..148d4a9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,21 +1,22 @@ sudo: false +dist: trusty language: python python: - "2.7" addons: apt: - sources: ['llvm-toolchain-precise-3.8', 'ubuntu-toolchain-r-test'] + sources: ['llvm-toolchain-trusty-4.0', 'ubuntu-toolchain-r-test'] packages: - make - gcc - python-virtualenv - unzip - - llvm-3.8 - - llvm-3.8-dev + - llvm-4.0 + - llvm-4.0-dev - g++-5 before_script: - "cd .." -- "export LLVM_CONFIG=$(which llvm-config-3.8)" +- "export LLVM_CONFIG=$(which llvm-config-4.0)" - "export CXX=$(which g++-5)" # make virtual env - "python /usr/lib/python2.7/dist-packages/virtualenv.py virtualenv;" @@ -27,11 +28,9 @@ before_script: - "make && export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd);cd ..;" - "cp tinycc/libtcc.h include" - "cp tinycc/libtcc.so.1.0 tinycc/libtcc.so" -# install llvmlite, using the system libdtc++ instead of statically linking it +# install llvmlite - "pip install enum34" -- "git clone https://github.com/numba/llvmlite llvmlite && cd llvmlite && git checkout 95d8c7c" -- "sed -i 's/-static-libstdc++ //' ffi/Makefile.linux" -- "python setup.py install && cd .." +- "pip install llvmlite" # install elfesteem - "git clone https://github.com/serpilliere/elfesteem elfesteem && cd elfesteem && python setup.py install && cd ..;" # install pyparsing diff --git a/miasm2/jitter/llvmconvert.py b/miasm2/jitter/llvmconvert.py index f84f7ed5..0f88d842 100644 --- a/miasm2/jitter/llvmconvert.py +++ b/miasm2/jitter/llvmconvert.py @@ -571,14 +571,14 @@ class LLVMFunction(): base_name = "printf_format" count = 0 - while self.mod.get_global("%s_%d" % (base_name, count)): + while "%s_%d" % (base_name, count) in self.mod.globals: count += 1 global_fmt = self.global_constant("%s_%d" % (base_name, count), fmt_bytes) fnty = llvm_ir.FunctionType(llvm_ir.IntType(32), [cstring], var_arg=True) # Insert printf() - fn = mod.get_global('printf') + fn = mod.globals.get('printf', None) if fn is None: fn = llvm_ir.Function(mod, fnty, name="printf") # Call |