Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement runtime checks for compilation settings #3899

Merged
merged 4 commits into from
Mar 9, 2022

Commits on Mar 8, 2022

  1. Implement runtime checks for compilation settings

    This commit fills out a few FIXME annotations by implementing run-time
    checks that when a `Module` is created it has compatible codegen
    settings for the current host (as `Module` is proof of "this code can
    run"). This is done by implementing new `Engine`-level methods which
    validate compiler settings. These settings are validated on
    `Module::new` as well as when loading serialized modules.
    
    Settings are split into two categories, one for "shared" top-level
    settings and one for ISA-specific settings. Both categories now have
    allow-lists hardcoded into `Engine` which indicate the acceptable values
    for each setting (if applicable). ISA-specific settings are checked with
    the Rust standard library's `std::is_x86_feature_detected!` macro. Other
    macros for other platforms are not stable at this time but can be added
    here if necessary.
    
    Closes bytecodealliance#3897
    alexcrichton committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    02adf4f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a2274a4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eebf5af View commit details
    Browse the repository at this point in the history
  4. Fix some broken tests

    alexcrichton committed Mar 8, 2022
    Configuration menu
    Copy the full SHA
    222d74f View commit details
    Browse the repository at this point in the history