tools/corrosion/RELEASES.md
branchtransitional_engine
changeset 16021 6a3dc15b78b9
equal deleted inserted replaced
16009:7544a7d7c819 16021:6a3dc15b78b9
       
     1 # v0.5.0 (2024-05-11)
       
     2 
       
     3 ### Breaking Changes
       
     4 
       
     5 - Dashes (`-`) in names of imported CMake **library** targets are now replaced with underscores (`_`).
       
     6   See [issue #501] for details. Users on older Corrosion versions will experience the same
       
     7   change when using Rust 1.79 or newer. `bin` targets are not affected by this change.
       
     8 
       
     9 [issue #501]: https://github.com/corrosion-rs/corrosion/issues/501
       
    10 
       
    11 # v0.4.10 (2024-05-11)
       
    12 
       
    13 ### New features
       
    14 
       
    15 - `corrosion_experimental_cbindgen()` can now be called multiple times on the same Rust target,
       
    16   as long as the output header name differs. This may be useful to generate separate C and C++
       
    17   bindings. [#507]
       
    18 - If `corrosion_link_libraries()` is called on a Rust static library target, then
       
    19   `target_link_libraries()` is called to propagate the dependencies to C/C++ consumers.
       
    20   Previously a warning was emitted in this case and the arguments ignored. [#506]
       
    21 
       
    22 ### Fixes
       
    23 
       
    24 - Combine `-framework` flags on macos to avoid linker deduplication errors [#455]
       
    25 - `corrosion_experimental_cbindgen()` will now correctly use the package name, instead of assuming that
       
    26     the package and crate name are identical. ([11e27c])
       
    27 - Set the `AR_<triple>` variable for `cc-rs` (except for msvc targets) [#456]
       
    28 - Fix hostbuild when cross-compiling to windows [#477]
       
    29 - Consider vworks executable suffix [#504]
       
    30 - `corrosion_experimental_cbindgen()` now forwards the Rust target-triple (e.g. `aarch64-unknown-linux-gnu`)
       
    31   to cbindgen via the `TARGET` environment variable. The `hostbuild` property is considered. [#507]
       
    32 - Fix linking errors with Rust >= 1.79 and `-msvc` targets.` [#511]
       
    33 
       
    34 
       
    35 [#455]: https://github.com/corrosion-rs/corrosion/pull/455
       
    36 [#456]: https://github.com/corrosion-rs/corrosion/pull/456
       
    37 [#477]: https://github.com/corrosion-rs/corrosion/pull/477
       
    38 [#504]: https://github.com/corrosion-rs/corrosion/pull/504
       
    39 [#506]: https://github.com/corrosion-rs/corrosion/pull/506
       
    40 [#507]: https://github.com/corrosion-rs/corrosion/pull/507
       
    41 [#511]: https://github.com/corrosion-rs/corrosion/pull/511
       
    42 [11e27c]: https://github.com/corrosion-rs/corrosion/pull/514/commits/11e27cde2cf32c7ed539c96eb03c2f10035de538
       
    43 
       
    44 # v0.4.9 (2024-05-01)
       
    45 
       
    46 ### New Features 
       
    47 
       
    48 - Automatically detect Rust target for OpenHarmony ([#510]).
       
    49 
       
    50 ### Fixes
       
    51 
       
    52 - Make find_package portable ([#509]).
       
    53 
       
    54 [#510]: https://github.com/corrosion-rs/corrosion/pull/510
       
    55 [#509]: https://github.com/corrosion-rs/corrosion/pull/509
       
    56 
       
    57 # v0.4.8 (2024-04-03)
       
    58 
       
    59 ### Fixes
       
    60 
       
    61 - Fix an internal error when passing both the `PROFILE` and `CRATES` option to
       
    62   `corrosion_import_crate()` ([#496]).
       
    63 
       
    64 [#496]: https://github.com/corrosion-rs/corrosion/pull/496
       
    65 
       
    66 # v0.4.7 (2024-01-19)
       
    67 
       
    68 ### Fixes
       
    69 
       
    70 - The C/C++ compiler passed from corrosion to `cc-rs` can now be overriden by users setting
       
    71   `CC_<target>` (e.g. `CC_x86_64-unknown-linux-gnu=/path/to/my-compiler`) environment variables ([#475]).
       
    72 
       
    73 [#475]: https://github.com/corrosion-rs/corrosion/pull/475
       
    74 
       
    75 # v0.4.6 (2024-01-17)
       
    76 
       
    77 ### Fixes
       
    78 
       
    79 - Fix hostbuild executables when cross-compiling from non-windows to windows targets.
       
    80   (Only with CMake >= 3.19).
       
    81 
       
    82 # v0.4.5 (2023-11-30)
       
    83 
       
    84 ### Fixes
       
    85 
       
    86 - Fix hostbuild executables when cross-compiling on windows to non-windows targets
       
    87   (Only with CMake >= 3.19).
       
    88 
       
    89 # v0.4.4 (2023-10-06)
       
    90 
       
    91 ### Fixes
       
    92 
       
    93 - Add `chimera` ([#445]) and `unikraft` ([#446]) to the list of known vendors
       
    94 
       
    95 [#445]: https://github.com/corrosion-rs/corrosion/pull/445
       
    96 [#446]: https://github.com/corrosion-rs/corrosion/pull/446
       
    97 
       
    98 # v0.4.3 (2023-09-09)
       
    99 
       
   100 ### Fixes
       
   101 
       
   102 - Fix the PROFILE option with CMake < 3.19 [#427]
       
   103 - Relax vendor parsing for espressif targets (removes warnings)
       
   104 - Fix an issue detecting required link libraries with Rust >= 1.71
       
   105   when the cmake build directory is located in a Cargo workspace.
       
   106 
       
   107 # 0.4.2 (2023-07-16)
       
   108 
       
   109 ### Fixes
       
   110 
       
   111 - Fix an issue when cross-compiling with clang
       
   112 - Fix detecting required libraries with cargo 1.71 
       
   113 
       
   114 ### New features
       
   115 
       
   116 - Users can now set `Rust_RESOLVE_RUSTUP_TOOLCHAINS` to `OFF`, which will result in Corrosion
       
   117   not attempting to resolve rustc/cargo.
       
   118 
       
   119 # 0.4.1 (2023-06-03)
       
   120 
       
   121 This is a bugfix release.
       
   122 
       
   123 ### Fixes
       
   124 
       
   125 - Fixes a regression on multi-config Generators
       
   126 
       
   127 # 0.4.0 LTS (2023-06-01)
       
   128 
       
   129 No changes compared to v0.4.0-beta2.
       
   130 
       
   131 ## Announcements
       
   132 
       
   133 The `v0.4.x` LTS series will be the last release to support older CMake and Rust versions.
       
   134 If necessary, fixes will be backported to the v0.4 branch. New features will not be
       
   135 actively backported after the next major release, but community contributions are possible.
       
   136 The `v0.4.x` series is currently planned to be maintained until the end of 2024.
       
   137 
       
   138 The following major release will increase the minimum required CMake version to 3.22. The 
       
   139 minimum supported Rust version will also be increased to make use of newly added flags, but 
       
   140 the exact version is not fixed yet. 
       
   141 
       
   142 
       
   143 ## Changes compared to v0.3.5:
       
   144 
       
   145 ### Breaking Changes
       
   146 
       
   147 - The Visual Studio Generators now require at least CMake 3.20.
       
   148   This was previously announced in the 0.3.0 release notes and is the same
       
   149   requirement as for the other Multi-Config Generators.
       
   150 - The previously deprecated function `corrosion_set_linker_language()`
       
   151   will now raise an error when called and may be removed without further
       
   152   notice in future stable releases. Use `corrosion_set_linker()` instead.
       
   153 - Improved the FindRust target triple detection, which may cause different behavior in some cases.
       
   154   The detection does not require an enabled language anymore and will always fall back
       
   155   to the default host target triple. A warning is issued if target triple detection failed.
       
   156 
       
   157 ### Potentially Breaking Changes
       
   158 
       
   159 - Corrosion now sets the `IMPORTED_NO_SONAME` property for shared rust libraries, since by
       
   160   default they won't have an `soname` field.
       
   161   If you add a rustflag like `-Clink-arg=-Wl,-soname,libmycrate.so` in your project,
       
   162   you should set this property to false on the shared rust library.
       
   163 - Corrosion now uses a mechanism to determine which native libraries need to be linked with
       
   164   Rust `staticlib` targets into C/C++ targets. The previous mechanism contained a hardcoded list.
       
   165   The new mechanism asks `rustc` which libraries are needed at minimum for a given
       
   166   target triple (with `std` support). This should not be a breaking change, but if you
       
   167   do encounter a new linking issue when upgrading with `staticlib` targets, please open an
       
   168   issue.
       
   169 
       
   170 ### New features
       
   171 
       
   172 - `corrosion_import_crate()` has two new options `LOCKED` and `FROZEN` which pass the 
       
   173   `--locked` and `--frozen` flags to all invocations of cargo.
       
   174 - `FindRust` now provides cache variables containing information on the default host
       
   175   target triple:
       
   176   - `Rust_CARGO_HOST_ARCH`
       
   177   - `Rust_CARGO_HOST_VENDOR`
       
   178   - `Rust_CARGO_HOST_OS`
       
   179   - `Rust_CARGO_HOST_ENV`
       
   180 
       
   181 ### Other changes
       
   182 
       
   183 - When installing Corrosion with CMake >= 3.19, the legacy Generator tool is
       
   184   no longer built and installed by default.
       
   185 - Corrosion now issues a warning when setting the linker or setting linker
       
   186   options for a Rust static library.
       
   187 - Corrosion no longer enables the `C` language when CMake is in crosscompiling mode and
       
   188   no languages where previously enabled. This is not considered a breaking change.
       
   189 - `corrosion_import_crate()` now warns about unexpected arguments.
       
   190 
       
   191 ### Fixes
       
   192 
       
   193 - Fix building when the `dev` profile is explicitly set by the user.
       
   194 
       
   195 ## Experimental features (may be changed or removed without a major version bump)
       
   196 
       
   197 - Experimental cxxbridge and cbindgen integration.
       
   198 - Add a helper function to parse the package version from a Cargo.toml file
       
   199 - Expose rustup toolchains discovered by `FindRust` in the following cache variables
       
   200   which contain a list.
       
   201   - `Rust_RUSTUP_TOOLCHAINS`: List of toolchains names
       
   202   - `Rust_RUSTUP_TOOLCHAINS_VERSION`: List of `rustc` version of the toolchains
       
   203   - `Rust_RUSTUP_TOOLCHAINS_RUSTC_PATH`: List of the path to `rustc`
       
   204   - `Rust_RUSTUP_TOOLCHAINS_CARGO_PATH`: List of the path to `cargo`. Entries may be `NOTFOUND` if cargo
       
   205     is not available for that toolchain.
       
   206 - Add target properties `INTERFACE_CORROSION_RUSTC` and `INTERFACE_CORROSION_CARGO`, which may
       
   207   be set to paths to `rustc` and `cargo` respectively to override the toolchain for a specific
       
   208   target.
       
   209 
       
   210 # 0.3.5 (2023-03-19)
       
   211 
       
   212 - Fix building the Legacy Generator on Rust toolchains < 1.56 ([#365])
       
   213 
       
   214 [#365]: https://github.com/corrosion-rs/corrosion/pull/365
       
   215 
       
   216 # 0.3.4 (2023-03-02)
       
   217 
       
   218 ## Fixes
       
   219 
       
   220 - Fix hostbuild (when CMake/Cargo is configured for cross-compiling) if clang is used ([#338]).
       
   221 
       
   222 ## Other
       
   223 
       
   224 - Pass `--no-deps` to cargo metadata ([#334]).
       
   225 - Bump the legacy generator dependencies
       
   226 
       
   227 [#334]: https://github.com/corrosion-rs/corrosion/pull/334
       
   228 [#338]: https://github.com/corrosion-rs/corrosion/pull/338
       
   229 
       
   230 
       
   231 # 0.3.3 (2023-02-17)
       
   232 
       
   233 ## New features (Only available on CMake >= 3.19)
       
   234 
       
   235 - Add new `IMPORTED_CRATES` flag to `corrosion_import_crate()` to retrieve the list of imported crates in the current
       
   236   scope ([#312](https://github.com/corrosion-rs/corrosion/pull/312)).
       
   237 
       
   238 ## Fixes
       
   239 
       
   240 - Fix imported location target property when the rust target name contains dashes
       
   241   and a custom OUTPUT_DIRECTORY was specified by the user ([#322](https://github.com/corrosion-rs/corrosion/pull/322)).
       
   242 - Fix building for custom rust target-triples ([#316](https://github.com/corrosion-rs/corrosion/pull/316))
       
   243 
       
   244 # 0.3.2 (2023-01-11)
       
   245 
       
   246 ## New features (Only available on CMake >= 3.19)
       
   247 
       
   248 - Add new `CRATE_TYPES` flag to `corrosion_import_crate()` to restrict which
       
   249   crate types should be imported ([#269](https://github.com/corrosion-rs/corrosion/pull/269)).
       
   250 - Add `NO_LINKER_OVERRIDE` flag to let Rust choose the default linker for the target
       
   251   instead of what Corrosion thinks is the appropriate linker driver ([#272](https://github.com/corrosion-rs/corrosion/pull/272)).
       
   252 
       
   253 ## Fixes
       
   254 
       
   255 - Fix clean target when cross-compiling ([#291](https://github.com/corrosion-rs/corrosion/pull/291)).
       
   256 - Don't set the linker for Rust static libraries ([#275](https://github.com/corrosion-rs/corrosion/pull/275)).
       
   257 - Minor fixes in FindRust [#297](https://github.com/corrosion-rs/corrosion/pull/297): 
       
   258   - fix a logic error in the version detection
       
   259   - fix a logic error in `QUIET` mode when rustup is not found.
       
   260 
       
   261 # 0.3.1 (2022-12-13)
       
   262 
       
   263 ### Fixes
       
   264 
       
   265 - Fix a regression in detecting the MSVC abi ([#256])
       
   266 - Fix an issue on macOS 13 which affected rust crates compiling C++ code in build scripts ([#254]).
       
   267 - Fix corrosion not respecting `CMAKE_<XYZ>_OUTPUT_DIRECTORY` values ([#268]).
       
   268 - Don't override rusts linker choice for the msvc abi (previously this was only skipped for msvc generators) ([#271])
       
   269 
       
   270 [#254]: https://github.com/corrosion-rs/corrosion/pull/254
       
   271 [#256]: https://github.com/corrosion-rs/corrosion/pull/256
       
   272 [#268]: https://github.com/corrosion-rs/corrosion/pull/268
       
   273 [#271]: https://github.com/corrosion-rs/corrosion/pull/271
       
   274 
       
   275 # 0.3.0 (2022-10-31)
       
   276 
       
   277 ## Breaking
       
   278 
       
   279 - The minimum supported rust version (MSRV) was increased to 1.46, due to a cargo issue that recently
       
   280   surfaced on CI when using crates.io. On MacOS 12 and Windows-2022 at least Rust 1.54 is required.
       
   281 - MacOS 10 and 11 are no longer officially supported and untested in CI.
       
   282 - The minimum required CMake version is now 3.15.
       
   283 - Adding a `PRE_BUILD` custom command on a `cargo-build_<target_name>` CMake target will no 
       
   284   longer work as expected. To support executing user defined commands before cargo build is
       
   285   invoked users should use the newly added targets `cargo-prebuild` (before all cargo build invocations)
       
   286   or `cargo-prebuild_<target_name>` as a dependency target. 
       
   287   Example: `add_dependencies(cargo-prebuild code_generator_target)`
       
   288 
       
   289 ### Breaking: Removed previously deprecated functionality
       
   290 - Removed `add_crate()` function. Use `corrosio_import_crate()` instead.
       
   291 - Removed `cargo_link_libraries()` function. Use `corrosion_link_libraries()` instead.
       
   292 - Removed experimental CMake option `CORROSION_EXPERIMENTAL_PARSER`.
       
   293   The corresponding stable option is `CORROSION_NATIVE_TOOLING` albeit with inverted semantics.
       
   294 - Previously Corrosion would set the `HOST_CC` and `HOST_CXX` environment variables when invoking 
       
   295   cargo build, if the environment variables `CC` and `CXX` outside of CMake where set.
       
   296   However this did not work as expected in all cases and sometimes the `HOST_CC` variable would be set
       
   297   to a cross-compiler for unknown reasons. For this reason `HOST_CC` and `HOST_CXX` are not set by
       
   298   corrosion anymore, but users can still set them manually if required via `corrosion_set_env_vars()`.
       
   299 - The `CARGO_RUST_FLAGS` family of cache variables were removed. Corrosion does not internally use them
       
   300   anymore.
       
   301 
       
   302 ## Potentially breaking
       
   303 
       
   304 - The working directory when invoking `cargo build` was changed to the directory of the Manifest
       
   305   file. This now allows cargo to pick up `.cargo/config.toml` files located in the source tree.
       
   306   ([205](https://github.com/corrosion-rs/corrosion/pull/205))
       
   307 - Corrosion internally invokes `cargo build`. When passing arguments to `cargo build`, Corrosion
       
   308   now uses the CMake `VERBATIM` option. In rare cases this may require you to change how you quote
       
   309   parameters passed to corrosion (e.g. via `corrosion_add_target_rustflags()`).
       
   310   For example setting a `cfg` option previously required double escaping the rustflag like this
       
   311   `"--cfg=something=\\\"value\\\""`, but now it can be passed to corrosion without any escapes:
       
   312   `--cfg=something="value"`.
       
   313 - Corrosion now respects the CMake `OUTPUT_DIRECTORY` target properties. More details in the "New features" section.
       
   314 
       
   315 ## New features
       
   316 
       
   317 - Support setting rustflags for only the main target and none of its dependencies ([215](https://github.com/corrosion-rs/corrosion/pull/215)).
       
   318   A new function `corrosion_add_target_local_rustflags(target_name rustc_flag [more_flags ...])`
       
   319   is added for this purpose.
       
   320   This is useful in cases where you only need rustflags on the main-crate, but need to set different
       
   321   flags for different targets. Without "local" Rustflags this would require rebuilds of the
       
   322   dependencies when switching targets.
       
   323 - Support explicitly selecting a linker ([208](https://github.com/corrosion-rs/corrosion/pull/208)).
       
   324   The linker can be selected via `corrosion_set_linker(target_name linker)`.
       
   325   Please note that this only has an effect for targets, where the final linker invocation is done
       
   326   by cargo, i.e. targets where foreign code is linked into rust code and not the other way around.
       
   327 - Corrosion now respects the CMake `OUTPUT_DIRECTORY` target properties and copies build artifacts to the expected
       
   328   locations ([217](https://github.com/corrosion-rs/corrosion/pull/217)), if the properties are set.
       
   329   This feature requires at least CMake 3.19 and is enabled by default if supported. Please note that the `OUTPUT_NAME`
       
   330   target properties are currently not supported.
       
   331   Specifically, the following target properties are now respected:
       
   332   -   [ARCHIVE_OUTPUT_DIRECTORY](https://cmake.org/cmake/help/latest/prop_tgt/ARCHIVE_OUTPUT_DIRECTORY.html)
       
   333   -   [LIBRARY_OUTPUT_DIRECTORY](https://cmake.org/cmake/help/latest/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html)
       
   334   -   [RUNTIME_OUTPUT_DIRECTORY](https://cmake.org/cmake/help/latest/prop_tgt/RUNTIME_OUTPUT_DIRECTORY.html)
       
   335   -   [PDB_OUTPUT_DIRECTORY](https://cmake.org/cmake/help/latest/prop_tgt/PDB_OUTPUT_DIRECTORY.html)
       
   336 - Corrosion now supports packages with potentially multiple binaries (bins) and a library (lib) at the
       
   337   same time. The only requirement is that the names of all `bin`s and `lib`s in the whole project must be unique.
       
   338   Users can set the names in the `Cargo.toml` by adding `name = <unique_name>` in the `[[bin]]` and `[lib]` tables.
       
   339 - FindRust now has improved support for the `VERSION` option of `find_package` and will now attempt to find a matching
       
   340   toolchain version. Previously it was only checked if the default toolchain matched to required version.
       
   341 - For rustup managed toolchains a CMake error is issued with a helpful message if the required target for
       
   342   the selected toolchain is not installed.
       
   343 
       
   344 ## Fixes
       
   345 
       
   346 - Fix a CMake developer Warning when a Multi-Config Generator and Rust executable targets
       
   347   ([#213](https://github.com/corrosion-rs/corrosion/pull/213)).
       
   348 - FindRust now respects the `QUIET` option to `find_package()` in most cases.
       
   349 
       
   350 ## Deprecation notice
       
   351 
       
   352 - Support for the MSVC Generators with CMake toolchains before 3.20 is deprecated and will be removed in the next
       
   353   release (v0.4). All other Multi-config Generators already require CMake 3.20.
       
   354 
       
   355 ## Internal Changes
       
   356 
       
   357 - The CMake Generator written in Rust and `CorrosionGenerator.cmake` which are responsible for parsing 
       
   358   `cargo metadata` output to create corresponding CMake targets for all Rust targets now share most code.
       
   359   This greatly simplified the CMake generator written in Rust and makes it much easier maintaining and adding
       
   360   new features regardless of how `cargo metadata` is parsed.
       
   361 
       
   362 # 0.2.2 (2022-09-01)
       
   363 
       
   364 ## Fixes
       
   365 
       
   366 - Do not use C++17 in the tests (makes tests work with older C++ compilers) ([184](https://github.com/corrosion-rs/corrosion/pull/184))
       
   367 - Fix finding cargo on NixOS ([192](https://github.com/corrosion-rs/corrosion/pull/192))
       
   368 - Fix issue with Rustflags test when using a Build type other than Debug and Release ([203](https://github.com/corrosion-rs/corrosion/pull/203)).
       
   369 
       
   370 # 0.2.1 (2022-05-07)
       
   371 
       
   372 ## Fixes
       
   373 
       
   374 - Fix missing variables provided by corrosion, when corrosion is used as a subdirectory ([181](https://github.com/corrosion-rs/corrosion/pull/181)):
       
   375   Public [Variables](https://github.com/corrosion-rs/corrosion#information-provided-by-corrosion) set
       
   376   by Corrosion were not visible when using Corrosion as a subdirectory, due to the wrong scope of
       
   377   the variables. This was fixed by promoting the respective variables to Cache variables.
       
   378 
       
   379 # 0.2.0 (2022-05-05)
       
   380 
       
   381 ## Breaking changes
       
   382 
       
   383 - Removed the integrator build script ([#156](https://github.com/corrosion-rs/corrosion/pull/156)).
       
   384   The build script provided by corrosion (for rust code that links in foreign code) is no longer necessary,
       
   385   so users can just remove the dependency.
       
   386 
       
   387 ## Deprecations
       
   388 
       
   389 - Direct usage of the following target properties has been deprecated. The names of the custom properties are
       
   390   no longer considered part of the public API and may change in the future. Instead, please use the functions
       
   391   provided by corrosion. Internally different property names are used depending on the CMake version.
       
   392   - `CORROSION_FEATURES`, `CORROSION_ALL_FEATURES`, `CORROSION_NO_DEFAULT_FEATURES`. Instead please use
       
   393     `corrosion_set_features()`. See the updated Readme for details.
       
   394   - `CORROSION_ENVIRONMENT_VARIABLES`. Please use `corrosion_set_env_vars()` instead.
       
   395   - `CORROSION_USE_HOST_BUILD`. Please use `corrosion_set_hostbuild()` instead.
       
   396 - The Minimum CMake version will likely be increased for the next major release. At the very least we want to drop
       
   397   support for CMake 3.12, but requiring CMake 3.16 or even 3.18 is also on the table. If you are using a CMake version
       
   398   that would be no longer supported by corrosion, please comment on issue
       
   399   [#168](https://github.com/corrosion-rs/corrosion/issues/168), so that we can gauge the number of affected users.
       
   400 
       
   401 ## New features
       
   402 
       
   403 - Add `NO_STD` option to `corrosion_import_crate` ([#154](https://github.com/corrosion-rs/corrosion/pull/154)).
       
   404 - Remove the requirement of building the Rust based generator crate for CMake >= 3.19. This makes using corrosion as
       
   405   a subdirectory as fast as the installed version (since everything is done in CMake).
       
   406   ([#131](https://github.com/corrosion-rs/corrosion/pull/131), [#161](https://github.com/corrosion-rs/corrosion/pull/161))
       
   407   If you do choose to install Corrosion, then by default the old Generator is still compiled and installed, so you can
       
   408   fall back to using it in case you use multiple cmake versions on the same machine for different projects.
       
   409 
       
   410 ## Fixes
       
   411 
       
   412 - Fix Corrosion on MacOS 11 and 12 ([#167](https://github.com/corrosion-rs/corrosion/pull/167) and
       
   413   [#164](https://github.com/corrosion-rs/corrosion/pull/164)).
       
   414 - Improve robustness of parsing the LLVM version (exported in `Rust_LLVM_VERSION`). It now also works for
       
   415   Rust versions, where the LLVM version is reported as `MAJOR.MINOR`. ([#148](https://github.com/corrosion-rs/corrosion/pull/148))
       
   416 - Fix a bug which occurred when Corrosion was added multiple times via `add_subdirectory()`
       
   417   ([#143](https://github.com/corrosion-rs/corrosion/pull/143)).
       
   418 - Set `CC_<target_triple_undercore>` and `CXX_<target_triple_undercore>` environment variables for the invocation of
       
   419   `cargo build` to the compilers selected by CMake  (if any)
       
   420   ([#138](https://github.com/corrosion-rs/corrosion/pull/138) and [#161](https://github.com/corrosion-rs/corrosion/pull/161)).
       
   421   This should ensure that C dependencies built in cargo buildscripts via [cc-rs](https://github.com/alexcrichton/cc-rs)
       
   422   use the same compiler as CMake built dependencies. Users can override the compiler by specifying the higher
       
   423   priority environment variable variants with dashes instead of underscores (See cc-rs documentation for details).
       
   424 - Fix Ninja-Multiconfig Generator support for CMake versions >= 3.20. Previous CMake versions are missing a feature,
       
   425   which prevents us from supporting the Ninja-Multiconfig generator. ([#137](https://github.com/corrosion-rs/corrosion/pull/137))
       
   426 
       
   427 
       
   428 # 0.1.0 (2022-02-01)
       
   429 
       
   430 This is the first release of corrosion after it was moved to the new corrosion-rs organization.
       
   431 Since there are no previous releases, this is not a complete changelog but only lists changes since
       
   432 September 2021.
       
   433 
       
   434 ## New features
       
   435 - [Add --profile support for rust >= 1.57](https://github.com/corrosion-rs/corrosion/pull/130):
       
   436   Allows users to specify a custom cargo profile with
       
   437   `corrosion_import_crate(... PROFILE <profilename>)`.
       
   438 - [Add support for specifying per-target Rustflags](https://github.com/corrosion-rs/corrosion/pull/127):
       
   439   Rustflags can be added via `corrosion_add_target_rustflags(<target_name> [rustflags1...])`
       
   440 - [Add `Rust_IS_NIGHTLY` and `Rust_LLVM_VERSION` variables](https://github.com/corrosion-rs/corrosion/pull/123):
       
   441   This may be useful if you want to conditionally enabled features when using a nightly toolchain
       
   442   or a specific LLVM Version.
       
   443 - [Let `FindRust` fail gracefully if rustc is not found](https://github.com/corrosion-rs/corrosion/pull/111):
       
   444   This allows using `FindRust` in a more general setting (without corrosion).
       
   445 - [Add support for cargo feature selection](https://github.com/corrosion-rs/corrosion/pull/108):
       
   446   See the [README](https://github.com/corrosion-rs/corrosion#cargo-feature-selection) for details on
       
   447   how to select features.
       
   448 
       
   449 
       
   450 ## Fixes
       
   451 - [Fix the cargo-clean target](https://github.com/corrosion-rs/corrosion/pull/129)
       
   452 - [Fix #84: CorrosionConfig.cmake looks in wrong place for Corrosion::Generator when CMAKE_INSTALL_LIBEXEC is an absolute path](https://github.com/corrosion-rs/corrosion/pull/122/commits/6f29af3ac53917ca2e0638378371e715a18a532d)
       
   453 - [Fix #116: (Option CORROSION_INSTALL_EXECUTABLE not working)](https://github.com/corrosion-rs/corrosion/commit/97d44018fac1b1a2a7c095288c628f5bbd9b3184)
       
   454 - [Fix building on Windows with rust >= 1.57](https://github.com/corrosion-rs/corrosion/pull/120)
       
   455 
       
   456 ## Known issues:
       
   457 - Corrosion is currently not working on macos-11 and newer. See issue [#104](https://github.com/corrosion-rs/corrosion/issues/104).
       
   458   Contributions are welcome.