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

rustc subcommand #1568

Merged
merged 12 commits into from
May 7, 2015
Merged

rustc subcommand #1568

merged 12 commits into from
May 7, 2015

Commits on May 1, 2015

  1. Add new subcommand rustc.

    - `cargo rustc` is starting out based on `cargo build`
    Sondre Lefsaker committed May 1, 2015
    Configuration menu
    Copy the full SHA
    754938f View commit details
    Browse the repository at this point in the history
  2. Add a new field to CompileOptions and BuildConfig: target_rustc_args

    - The new field is a list with arguments to compile the target with.
    - There should only be one target that gets compiled with these arguments
    Sondre Lefsaker committed May 1, 2015
    Configuration menu
    Copy the full SHA
    77bb01e View commit details
    Browse the repository at this point in the history
  3. Pass the arg_opts from the command line further on to the CompileOp…

    …tions.
    
    - The new tests verifies that the extra arguments gets appended to the command. One is for lib and one is for main
    - Currently the arguments gets passed on to *every* target that gets built, so the tests only contain one file each
    Sondre Lefsaker committed May 1, 2015
    Configuration menu
    Copy the full SHA
    b177d2a View commit details
    Browse the repository at this point in the history

Commits on May 2, 2015

  1. Configuration menu
    Copy the full SHA
    512b217 View commit details
    Browse the repository at this point in the history
  2. Add new field rustc_args to the Profile

    - This field will be set by the `cargo rustc` command, only if one target is being compiled
    - The field can not be read from the Cargo.toml
    Sondre Lefsaker committed May 2, 2015
    Configuration menu
    Copy the full SHA
    53453c8 View commit details
    Browse the repository at this point in the history
  3. Remove the arguments from BuildConfig and append them to the profil…

    …e that's being compiled instead.
    
    - An error will be returned if the length of `targets` is not 1
    - The profile of `targets` gets cloned in order to append the extra arguments.
    - The new test verifies that the build fails due to both `lib` and `main` being compiled
    Sondre Lefsaker committed May 2, 2015
    Configuration menu
    Copy the full SHA
    582e9d9 View commit details
    Browse the repository at this point in the history
  4. Modify test to build main like before, but lib also gets built as…

    … a dependency.
    
    - The test verifies that the trailing arguments only gets passed to the binary being built
    Sondre Lefsaker committed May 2, 2015
    Configuration menu
    Copy the full SHA
    d8cd6f0 View commit details
    Browse the repository at this point in the history
  5. Cleanup tests - favor more explicit expected result instead of using …

    …helper functions
    Sondre Lefsaker committed May 2, 2015
    Configuration menu
    Copy the full SHA
    bd4d15f View commit details
    Browse the repository at this point in the history
  6. Add more tests:

    - `build_with_args_to_one_of_multiple_binaries`, verify that only one bin gets built
    - `fails_with_args_to_all_binaries`
    - `build_with_args_to_one_of_multiple_tests`, same behavious as for the binaries
    - `build_foo_with_bar_dependency`, verify that bar dependency gets built and only foo gets compiled with args
    - `build_only_bar_dependency`, build the bar package, that foo depends, on with the extra args
    Sondre Lefsaker committed May 2, 2015
    Configuration menu
    Copy the full SHA
    c867813 View commit details
    Browse the repository at this point in the history

Commits on May 6, 2015

  1. Update subcommand documentation

    Sondre Lefsaker committed May 6, 2015
    Configuration menu
    Copy the full SHA
    dc33bfa View commit details
    Browse the repository at this point in the history
  2. Cleanup:

    - Dereference arguments before matching
    - use square brackets for vec! macro
    Sondre Lefsaker committed May 6, 2015
    Configuration menu
    Copy the full SHA
    98c0e2d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2cd3c86 View commit details
    Browse the repository at this point in the history