Commit Graph

18 Commits

Author SHA1 Message Date
Jussi Pakkanen 8361da5c52 Fix setup so test suite runs with rustc + MSVC. Closes: 5099 2019-03-24 20:56:06 +02:00
Jussi Pakkanen cd63ca9c19 Support Rust targets with more than one source file. Closes #3632. 2018-06-17 15:39:59 +03:00
Adam C. Foltzer 3332f33649 Fix Rust compiler-private library ambiguity
When building a Rust target with Rust library dependencies, an
`--extern` argument is now specified to avoid ambiguity between the
dependency library, and any crates of the same name in `rustc`'s
private sysroot.

Includes an illustrative test case.
2018-02-22 22:16:58 +02:00
Adam C. Foltzer 281294286e Fix Rust shared polyglot test case for cross-compilation
The crate-type in this case should have been `cdylib` since it's
linking via C, rather than the default `dylib` that is meant for
linking via `rustc`.
2018-02-02 11:31:47 -08:00
Adam C. Foltzer 4eda3ca0fc add `crate-name` to Rust target args
This is required for downstream Rust dependencies to properly import
libraries using `extern crate`.
2017-07-22 03:49:39 +03:00
Adam C. Foltzer 35fae9d019 fix failing Rust test cases 2017-06-14 11:50:35 -07:00
Adam C. Foltzer 69b18cf7e9 rename `crate_type` to `rust_crate_type` per @TingPing 2017-06-14 08:39:41 -07:00
Adam C. Foltzer bdd4c45b17 Enhance Rust support
- Adds a `crate_type` kwarg to library targets, allowing the different
  types of Rust [linkage][1].
- Shared libraries use the `dylib` crate type by default, but can also
  be `cdylib`
- Static libraries use the `rlib` crate type by default, but can also
  be `staticlib`
- If any Rust target has shared library dependencies, add the
  appropriate linker arguments, including rpath for the sysroot of the
  Rust compiler

[1]: https://doc.rust-lang.org/reference/linkage.html
2017-06-09 15:14:02 -07:00
Patrick Griffis b520a4f030 rust: Support rust_args 2017-05-08 15:25:52 -04:00
Patrick Griffis 9929e0efac rust: Support executable name differing from source name 2017-03-29 21:09:51 +03:00
Nirbheek Chauhan 45c8557dc6 Fix tests for the new library/executable naming scheme
Also add new tests for the platform-specific and compiler-specific
versioning scheme.

A rough summary is:

1. A bug in how run_tests.py:validate_install checked for files has been
   fixed. Earlier it wasn't checking the install directory properly.
2. Shared libraries are no longer installed in common tests, and the
   library name/path testing is now done in platform-specific tests.
3. Executables are now always called something?exe in the
   installed_files.txt file, and the suffix automatically corrected
   depending on the platform.
4. If a test installs a file called 'no-installed-files', the installed
   files for that test are not validated. This is required to implement
   compiler-specific tests for library names/paths such as MSVC vs MinGW
5. The platform-specific file renaming in run_tests.py has been mostly
   removed since it is broken for shared libraries and isn't needed for
   static libraries.
6. run_tests.py now reports all missing and extra files. The logic for
   finding these has been reworked.
2016-07-01 20:50:47 +05:30
Jussi Pakkanen d952812b1b Fix Rust to work with 1.3 release. Closes #277. 2015-10-11 23:30:52 +03:00
Jussi Pakkanen 2d23a44e6e Deal with Rust static libraries, too. 2014-06-23 20:53:20 +03:00
Jussi Pakkanen 2366f822d2 Install Rust shared libraries. 2014-06-23 20:29:18 +03:00
Jussi Pakkanen 923ad8ab9b Invoke Rust via wrapper script. 2014-06-22 19:38:47 +03:00
Jussi Pakkanen 7b4595e07c Set up dependencies for Rust linking. Does not work fully yet. 2014-06-19 00:25:15 +03:00
Jussi Pakkanen bf4708eb83 Build a shared Rust library. 2014-06-19 00:02:19 +03:00
Jussi Pakkanen f22376701b Can compile very basic Rust programs. 2014-06-18 01:22:55 +03:00