Commit Graph

70 Commits

Author SHA1 Message Date
Dan Gohman
fde5ddf159 Fixes for 0.15 (#1449)
* Wasmtime 0.15.0 and Cranelift 0.62.0. (#1398)

* Bump more ad-hoc versions.

* Add build.rs to wasi-common's Cargo.toml.

* Update the env var name in more places.

* Remove a redundant echo.
2020-04-03 13:13:37 -07:00
Dan Gohman
6fa9be7767 Wasmtime 0.13.0 and Cranelift 0.61.0. (#1398)
This also updates the publishing scripts to work with newly added
and reorganized crates.
2020-03-26 13:19:02 -07:00
Nathan Froyd
dcabb55776 change Module::define_function to take TrapSink instances
Experience with the `define_function` API has shown that returning
borrowed slices of `TrapSite` is not ideal: the returned slice
represents a borrow on the entire `Module`, which makes calling back
into methods taking `&mut self` a bit tricky.

To eliminate the problem, let's require the callers of `define_function`
to provide `TrapSink` instances.  This style of API enables them to
control when and how traps are collected, and makes the `object` and
`faerie` backends simpler/more efficient by not having to worry about
trap collection.
2020-03-24 13:36:01 -04:00
Nathan Froyd
af709ded94 bump cranelift version to 0.60.0 (#1328) 2020-03-17 15:29:20 -04:00
Pat Hickey
8bbf07c758 Merge pull request #1327 from bjorn3/linkage_hidden
Add support for hidden visibility
2020-03-17 11:34:41 -07:00
bjorn3
b4562c62e3 Add support for hidden visibility 2020-03-17 17:51:12 +01:00
Pat Hickey
fdfda89d59 cranelift-module: make backend error an anyhow::Error
This allows us to retain richer information from backend errors.
We already have `anyhow` as a dep in several places in the wasmtime
tree, and in cranelift-faerie. faerie is the only user of this
variant.

Existing code that puts a String into the Backend error can trivially
adapt their code to emit an anyhow::Error.
2020-03-17 09:44:33 -07:00
Till Schneidereit
8f824a9fc1 Update outdated references to the Cranelift repository
This patch updates or removes all references to the Cranelift repository. It affects links in README documents, issues that were transferred to the Wasmtime repository, CI badges, and a small bunch of sundry items.
2020-03-09 14:06:24 +01:00
Pat Hickey
e47de6f605 Merge pull request #1214 from froydnj/trap-exposure
cranelift-module: expose trap information when defining functions
2020-03-05 14:17:19 -08:00
Alex Crichton
3179dcf6f1 Update Cranelift's documentation after the merger. (#1238)
Update the documentation for the merger, and also for various changes in
Cranelift. Remove some old obsolete documentation, and convert the remaining
Sphinx files to Markdown. Some of the remaining content is still out of
date, but this is a step forward.
2020-03-05 15:51:12 -06:00
Nathan Froyd
2bb3096342 change interfaces to use slices instead of Vec 2020-03-05 10:19:01 -05:00
Nathan Froyd
0f49a830c9 cranelift-module: expose trap information when defining functions
The current interface of `cranelift-module` requires consumers who want
to be informed about traps to discover that information through
`Module::Product`, which is backend-specific.  Since it's advantageous
to manipulate this information in a backend-agnostic way, this patch
changes `Module::define_function{,_bytes}` to return information about
the traps contained in the function being defined.
2020-03-03 11:37:15 -05:00
Alex Crichton
5f1cba0b7f Hook up all crates via path dependencies 2020-02-28 09:16:05 -08:00
bjorn3
0a1bb3ba6c Add TLS support for ELF and MachO (#1174)
* Add TLS support
* Add binemit and legalize tests
* Spill all caller-saved registers when necessary
2020-02-25 17:50:04 -08:00
Dan Gohman
0a11736fbf Bump version to 0.59.0 (#1406) 2020-02-24 15:10:08 -08:00
Nathan Froyd
09c6c5db44 add a "raw" function definition interface to cranelift-module (#1400)
* move trap site definitions into cranelift-module

`cranelift-faerie` and `cranelift-object` already have identical
definitions of structures to represent trap sites.  We might as well
merge them ahead of work to define functions via a raw slice of bytes
with associated traps, which will need some kind of common structure for
representing traps anyway.

* cranelift-module: add `define_function_bytes` interface

This interface is useful when the client needs to precisely specify the
ordering of bytes in a particular function.

* add comment about saving files for `perf`
2020-02-21 15:14:37 -08:00
Philip Craig
51229c3f58 cranelift-module: document that finalize methods may not be relevant 2020-02-10 11:42:11 +01:00
Philip Craig
3c15f8f129 cranelift-object: move relocation processing to finish
This removes the need to call `finalize_definitions` for cranelift-object.
`finalize_definitions` is only intended for backends that produce
finalized functions and data objects, which cranelift-object does not.
2020-02-10 11:42:11 +01:00
Dan Gohman
376654bdfc Bump version to 0.58.0 (#1382) 2020-02-07 13:58:06 -08:00
Nathan Froyd
a136d1cb00 add documentation mentions of cranelift-object where appropriate
This change makes it slightly more obvious that `cranelift-object` can
be used in lieu of `cranelift-faerie`.
2020-02-04 15:42:39 -06:00
Nick Fitzgerald
19a188789b Bump to 0.57.0 (#1375)
* Update wasmparser to 0.48.2

* Bump to version 0.57.0
2020-02-04 16:18:59 +01:00
Dan Gohman
80d11e3f8d Bump version to 0.56.0 (#1356) 2020-01-17 14:33:52 -08:00
Dan Gohman
b00a181824 Bump version to 0.55.0 (#1345) 2020-01-14 13:04:11 -08:00
Dan Gohman
582e7942f8 Bump version to 0.54.0 (#1333) 2020-01-10 14:08:07 -08:00
Benjamin Bouvier
ac8a952a6b Bump version to 0.52.0 2019-12-18 12:37:08 +01:00
Joshua Nelson
fcb0593796 [module] Finalize definitions for the end-user
Closes https://github.com/bytecodealliance/cranelift/issues/1288 by
calling `module.finalize_definitions` whenever `module.finish` is
called.
2019-12-16 12:44:25 +01:00
Dan Gohman
b4528beaf5 Bump version to 0.51.0 (#1250) 2019-11-20 22:40:55 -08:00
Benjamin Bouvier
9080a02e10 Replace CraneStation by bytecodealliance everywhere; (#1221) 2019-11-12 10:09:31 -08:00
Dan Gohman
cf82863ea9 Bump version to 0.49.0 (#1208) 2019-11-06 14:38:46 -08:00
Dan Gohman
45fb377457 Bump version to 0.48.0 (#1202)
* Bump version to 0.48.0

* Re-enable `byteorder`'s default features.

The code uses `WriteBytesExt` which depends on the `std` feature being
enabled. So for now, just enable `std`.
2019-11-05 13:59:19 -08:00
Dan Gohman
a9868de3d8 Bump version to 0.47.0 2019-11-04 15:43:27 -08:00
Josh Triplett
d6b3ca28b4 Add and use a From impl from CodegenError to ModuleError
This will also improve reporting of the chain of errors.
2019-10-30 17:15:09 -07:00
Josh Triplett
7e725cf880 Migrate from failure to thiserror
The failure crate invents its own traits that don't use
std::error::Error (because failure predates certain features added to
Error); this prevents using ? on an error from failure in a function
using Error. The thiserror crate integrates with the standard Error
trait instead.
2019-10-30 17:15:09 -07:00
Josh Triplett
fcf0ad1d5d Log function definition unconditionally
Don't log inside the `.map_err` call, which resulted in only logging
function definitions on codegen errors.
2019-10-30 15:55:26 +01:00
Joshua Nelson
e045a6df27 implement Debug for Linkage
this would have been useful while debugging something in my own project
2019-10-28 11:43:15 +01:00
Peter Huene
9f506692c2 Fix clippy warnings.
This commit fixes the current set of (stable) clippy warnings in the repo.
2019-10-24 17:20:12 -07:00
Dan Gohman
50b7d2827d Bump version to 0.46.1 2019-10-15 11:11:48 -07:00
Dan Gohman
ac4e93f971 Bump version to 0.46.0 2019-10-15 09:43:28 -07:00
Dan Gohman
ece9450a2f Bump version to 0.45.0 2019-10-09 06:20:30 -07:00
bjorn3
a114423d0a Remove std feature from cranelift-entity 2019-10-02 11:50:44 -07:00
Joshua Nelson
a1f6457e8a Allow building without std (#1069)
Closes https://github.com/CraneStation/cranelift/issues/1067
2019-09-26 18:00:03 +02:00
Dan Gohman
dfdd504edc Bump version to 0.44.0 2019-09-24 16:28:17 -07:00
Dan Gohman
411545ed9a Bump version to 0.43.1 2019-09-20 14:11:15 -07:00
Dan Gohman
5c5eabb8d0 Bump version to 0.43.0 2019-09-19 12:23:51 -07:00
Philip Craig
3293ca6b69 Add cranelift-object 2019-09-09 21:54:20 -07:00
Dan Gohman
d858ebb4aa Bump version to 0.42.0 2019-09-05 17:36:04 -07:00
Pat Hickey
89d741f8ae upgrade to target-lexicon 0.8.0
* the target-lexicon crate no longer has or needs the std feature
  in cargo, so we can delete all default-features=false, any mentions
  of its std feature, and the nostd configs in many lib.rs files
* the representation of arm architectures has changed, so some case
  statements needed refactoring
2019-09-04 15:12:17 -07:00
Dan Gohman
8becc9a64c Bump version to 0.41.0 2019-08-30 23:22:48 -07:00
Joshua Nelson
1eb6cd93b2 Fix documentation typo
function -> data object
2019-08-23 15:52:49 +02:00
Dan Gohman
13f83d8291 Bump version to 0.40.0 2019-08-20 15:32:19 -07:00