about summary refs log tree commit diff
path: root/src/test/run-make/crate-data-smoke
AgeCommit message (Collapse)AuthorLines
2018-03-22rustc: Add a `#[wasm_custom_section]` attributeAlex Crichton-51/+0
This commit is an implementation of adding custom sections to wasm artifacts in rustc. The intention here is to expose the ability of the wasm binary format to contain custom sections with arbitrary user-defined data. Currently neither our version of LLVM nor LLD supports this so the implementation is currently custom to rustc itself. The implementation here is to attach a `#[wasm_custom_section = "foo"]` attribute to any `const` which has a type like `[u8; N]`. Other types of constants aren't supported yet but may be added one day! This should hopefully be enough to get off the ground with *some* custom section support. The current semantics are that any constant tagged with `#[wasm_custom_section]` section will be *appended* to the corresponding section in the final output wasm artifact (and this affects dependencies linked in as well, not just the final crate). This means that whatever is interpreting the contents must be able to interpret binary-concatenated sections (or each constant needs to be in its own custom section). To test this change the existing `run-make` test suite was moved to a `run-make-fulldeps` folder and a new `run-make` test suite was added which applies to all targets by default. This test suite currently only has one test which only runs for the wasm target (using a node.js script to use `WebAssembly` in JS to parse the wasm output).
2015-01-20rustc: Remove deprecated flagsAlex Crichton-6/+6
This commit removes a number of deprecated flags from the compiler: * opt-level => -C opt-level * debuginfo => -C debuginfo * print-crate-name => --print crate-name * print-file-name => --print file-names * no-trans => -Z no-trans * no-analysis => -Z no-analysis * parse-only => -Z parse-only * dep-info => --emit dep-info This commit also moves the --pretty flag behind `-Z unstable-options` as the pretty printer will likely not be stable for 1.0 cc #19051
2014-07-21rustc: Append platform exe suffix to output filesAlex Crichton-3/+4
Closes #15828
2014-07-05rustc: Repurpose the --crate-name CLI flagAlex Crichton-6/+6
In a cargo-driven world the primary location for the name of a crate will be in its manifest, not in the source file itself. The purpose of this flag is to reduce required duplication for new cargo projects. This is a breaking change because the existing --crate-name flag actually printed the crate name. This flag was renamed to --print-crate-name, and to maintain consistence, the --crate-file-name flag was renamed to --print-file-name. To maintain backwards compatibility, the --crate-file-name flag is still recognized, but it is deprecated. [breaking-change]
2014-07-05test: Fix tests for crate_id removalAlex Crichton-4/+3
This involved removing some tests whose functionality was removed such as many of the crateresolve tests
2014-06-27Update to 0.11.0 0.11.0Alex Crichton-2/+2
2014-05-12Add the patch number to version strings. Closes #13289Brian Anderson-2/+2
2014-04-14Use new attribute syntax in python files in src/etc too (#13478)Manish Goregaokar-5/+5
2014-04-03Bump version to 0.11-preBrian Anderson-2/+2
This also changes some of the download links in the documentation to 'nightly'.
2014-03-31Bump version to 0.10Alex Crichton-2/+2
2014-02-07Added tests to make tidyDerek Guenther-0/+30
2014-02-06Redesign output flags for rustcAlex Crichton-1/+1
This commit removes the -c, --emit-llvm, -s, --rlib, --dylib, --staticlib, --lib, and --bin flags from rustc, adding the following flags: * --emit=[asm,ir,bc,obj,link] * --crate-type=[dylib,rlib,staticlib,bin,lib] The -o option has also been redefined to be used for *all* flavors of outputs. This means that we no longer ignore it for libraries. The --out-dir remains the same as before. The new logic for files that rustc emits is as follows: 1. Output types are dictated by the --emit flag. The default value is --emit=link, and this option can be passed multiple times and have all options stacked on one another. 2. Crate types are dictated by the --crate-type flag and the #[crate_type] attribute. The flags can be passed many times and stack with the crate attribute. 3. If the -o flag is specified, and only one output type is specified, the output will be emitted at this location. If more than one output type is specified, then the filename of -o is ignored, and all output goes in the directory that -o specifies. The -o option always ignores the --out-dir option. 4. If the --out-dir flag is specified, all output goes in this directory. 5. If -o and --out-dir are both not present, all output goes in the current directory of the process. 6. When multiple output types are specified, the filestem of all output is the same as the name of the CrateId (derived from a crate attribute or from the filestem of the crate file). Closes #7791 Closes #11056 Closes #11667
2014-01-12Bump version to 0.10-preBrian Anderson-2/+2
2013-12-20rustc: Improve crate id extractionAlex Crichton-0/+21
Right now the --crate-id and related flags are all process *after* the entire crate is parsed. This is less than desirable when used with makefiles because it means that just to learn the output name of the crate you have to parse the entire crate (unnecessary). This commit changes the behavior to lift the handling of these flags much sooner in the compilation process. This allows us to not have to parse the entire crate and only have to worry about parsing the crate attributes themselves. The related methods have all been updated to take an array of attributes rather than a crate. Additionally, this ceases duplication of the "what output are we producing" logic in order to correctly handle things in the case of --test. Finally, this adds tests for all of this functionality to ensure that it does not regress.