Linker refactoring (#1773)
* Minor code tidying. * Document that `Linker::iter`'s iteration order is arbitrary. * Add a few more tests for `wasmtime::Linker`. * Refactor `Linker::compute_imports`. - Extract the error message generation into a separate function. - In the error message, sort the candidates. * Fix a typo in a comment. * Add `__rtti_base` to the list of allowed but deprecated exports. * Don't print an Error message when a program exits normally. * Update comments to reflect the current code. * Also allow "table" as an exported table, which is used by AssemblyScript.
This commit is contained in:
@@ -162,8 +162,6 @@ impl RunCommand {
|
||||
// a message and exit.
|
||||
if let Some(trap) = e.downcast_ref::<Trap>() {
|
||||
// Print the error message in the usual way.
|
||||
eprintln!("Error: {:?}", e);
|
||||
|
||||
if let Some(status) = trap.i32_exit_status() {
|
||||
// On Windows, exit status 3 indicates an abort (see below),
|
||||
// so return 1 indicating a non-zero status to avoid ambiguity.
|
||||
@@ -173,6 +171,8 @@ impl RunCommand {
|
||||
process::exit(status);
|
||||
}
|
||||
|
||||
eprintln!("Error: {:?}", e);
|
||||
|
||||
// If the program exited because of a trap, return an error code
|
||||
// to the outside environment indicating a more severe problem
|
||||
// than a simple failure.
|
||||
|
||||
Reference in New Issue
Block a user