Commit Graph

43 Commits

Author SHA1 Message Date
Syrus
13e6f29c29 Set compiler config to be owned (following wasm-c-api) 2020-12-04 02:39:19 -08:00
losfair
e7dd725c6d Add module info transformation method to ModuleMiddleware. 2020-11-20 14:34:46 -08:00
Nick Lewycky
5d40787856 Add a compiler-llvm CompilerFunctionKind for the whole module which can occur with the experimental API for engine-native.
Since it's no longer per-function, rename CompilerFunctionKind to CompilerKind.
2020-08-20 23:28:07 -07:00
Mark McCaskey
6e974b92cd Run cargo fmt 2020-08-13 18:12:43 -07:00
Mark McCaskey
5049c543dc Rename wasm-common crate to wasmer-types 2020-08-13 17:59:26 -07:00
Syrus
dd4f27accc Fixed ARM cross compilation 2020-08-11 12:23:11 -07:00
Nick Lewycky
6b1df05582 Explain why we switch away from large code model when PIC is enabled.
Note that I don't explain why Small vs Medium. I'm not sure myself.
2020-08-10 16:32:35 -07:00
Nick Lewycky
45dcee1282 When we're building PIC we don't need the large code model. Try small.
Only mangle darwin to linux when PIC is disabled (the reason we do it is to avoid LLVM forcably enabling PIC for us).
2020-08-07 18:13:56 -07:00
nlewycky
b5d9c29d42 Pass target BinaryFormat through when targeting native object files
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2020-08-07 14:18:01 -07:00
Nick Lewycky
ace5072169 Try producing the binary format native to each platform if we're going to try to dlopen/LoadLibrary it. 2020-08-06 17:40:27 -07:00
Syrus
1293df8dd6 Added Debug to public structs. Close #173 2020-07-21 20:38:32 -07:00
Nick Lewycky
138899c186 Remove verify_ir() from Cranelift and LLVM config classes.
It's replaced by `enable_verifier()` on the CompilerConfig trait.

Enable verifier for all compilers (it's a no-op on singlepass but enabled
nevertheless) when running tests.
2020-07-13 12:13:49 -07:00
Nick Lewycky
50e54f6be6 Add --enable-verifier to the wasmer command line. Wire it through CompilerConfig. 2020-07-13 12:03:52 -07:00
Ivan Enderlin
f00e089ad3 fix(compiler-llvm) Remove an unused import. 2020-06-23 09:32:50 +02:00
Syrus
56c2f52001 Improved Compiler API 2020-06-22 14:58:58 -07:00
Syrus
769ffebb61 Improved feature-generation to be compiler-based 2020-06-18 02:11:54 -07:00
Syrus
422051ebe5 Simplified compiler config names 2020-06-18 01:36:25 -07:00
Syrus
99bd98458a Improved compiler configurations 2020-06-17 22:47:32 -07:00
Syrus
8649f2eb79 Remove target from CompilerConfig 2020-06-17 20:26:50 -07:00
Syrus
e062e87d8b Refactored Compilers 2020-06-17 19:17:06 -07:00
losfair
1bbaafb819 Middleware for LLVM. 2020-06-16 00:56:43 +08:00
Syrus
bea005a534 Fix cross-compilation 2020-06-11 16:24:07 -07:00
Syrus Akbary
616d475785 Update lib/compiler-llvm/src/config.rs
Co-authored-by: nlewycky <nick@wasmer.io>
2020-06-04 16:15:58 -07:00
Syrus
fa6de35944 Added support for custom cpu features 2020-06-04 15:50:03 -07:00
Nick Lewycky
14188bed44 Revert "Ignore multi-value errors on LLVM too, for now."
This reverts commit 486dedc601.
2020-06-02 15:44:39 -07:00
Syrus Akbary
367dff887a Update lib/compiler-llvm/src/config.rs
Co-authored-by: nlewycky <nick@wasmer.io>
2020-06-01 14:12:57 -07:00
Syrus
2a9ce436f9 Added LLVM callbacks 2020-06-01 13:54:26 -07:00
Nick Lewycky
3c9c214b2c Less editorializing. 2020-05-26 10:41:20 -07:00
Nick Lewycky
b81e241cdf Add support for producing .o files as PIC.
We then can't handle the relocations in those .o files, but it's progress.
2020-05-26 10:41:13 -07:00
Nick Lewycky
a47a3068f4 Remove #![allow(unused_imports, dead_code)] and fix resulting issues.
Fix nearly-all issues found by clippy too.
2020-05-20 17:18:23 -07:00
Nick Lewycky
ac5a6ce3f9 Rename the use of inkwell::targets::Target from LLVMTarget to InkwellTarget.
Makes it consistent with other renamed inkwell imports that are prefaced with 'Inkwell'.
2020-05-20 12:40:39 -07:00
Syrus
09e057338a Renamed Module to ModuleInfo 2020-05-19 18:47:50 -07:00
Syrus
ae8dcfcb27 Make PIC optional for compilers 2020-05-19 16:56:56 -07:00
Nick Lewycky
7783879ae2 Improve comment. 2020-05-18 12:44:49 -07:00
Nick Lewycky
be1754766e Fix issue with GOT relocations being emitted on Mac. 2020-05-18 12:30:49 -07:00
Nick Lewycky
486dedc601 Ignore multi-value errors on LLVM too, for now. 2020-05-13 15:57:41 -07:00
Nick Lewycky
613e40ed79 The llvm compiler uses ELF under the hood, attempt to convert any Target to the same thing, but with ELF. 2020-05-12 21:11:42 -07:00
Mark McCaskey
480ecd2cda Apply various fixes to get the C API working
24% of tests are passing now!
2020-05-07 14:02:13 -07:00
Syrus
6a06af1b1b Simplified compiler config removing mutable features and target 2020-05-02 15:22:05 -07:00
Syrus
4e36cf987b Make compilers feature-configurable 2020-05-02 15:17:18 -07:00
Nick Lewycky
56fe08ad00 Assorted fixes:
Fix creation of the target machine. Fix CPU features, architecture and target name.

Function names are not mandatory. Support unnamed functions.

Include parameters and local variables in the list of local variables for LLVMFunctionCodeGenerator.

Run the tests single-threaded, using a Mutex in the rayon code. This means that only the first error is real, subsequent errors are just picking up the panic across threads.

Add TODOs about attributes on vmctx.
2020-04-23 23:32:17 -07:00
Nick Lewycky
4e6371c3ce Fix most compile issues in compiler-llvm.
Still to be fixed are MemoryPlan, MemoryStyle, TablePlan, and TableStyle.
2020-04-22 16:30:55 -07:00
Syrus
a402691303 First iteration of wasmer-reborn 2020-04-21 21:37:33 -07:00