999 Commits

Author SHA1 Message Date
openharmony_ci a4159e1fdd !2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
OpenHarmony-v4.0-Beta1 OpenHarmony-v4.0-Beta2
2023-05-05 02:25:55 +00:00
peizhe 46169a9824 README.OpenSource 中License信息整改
Signed-off-by: peizhe <zhaipeizhe@huawei.com>
2023-04-28 16:31:47 +08:00
openharmony_ci f827488b99 !1 [cc-rs]Add GN Build Files and Custom Modifications to Rust Third-party Libraries
Merge pull request !1 from peizhe/master
2023-04-28 08:02:46 +00:00
peizhe 2bfeee3b7b Add GN Build Files and Custom Modifications
Signed-off-by: peizhe <zhaipeizhe@huawei.com>
2023-04-23 15:28:01 +08:00
Mark Rousskov e8cc76ff3b Merge pull request #778 from thomcc/bump-1.0.79
Prep release 1.0.79
github.com/rust-lang/cc-rs/refs/tags/1.0.79
2023-01-28 15:03:56 -05:00
Thom Chiovoloni 17d5445d25 Prep release 1.0.79 2023-01-27 17:17:13 -08:00
Jiahao XU 3b92e7b3ce Fix gcc-shim, apply clippy warning & optimizations to it (#777) 2023-01-27 08:29:21 -08:00
Dennis Duda 6d54529603 fix msbuild from vs2022 not being found 2023-01-26 06:56:33 +00:00
Josh Guilfoyle c5e8a4106e Add support for riscv32imc-esp-espidf (#776) 2023-01-25 13:45:06 -08:00
Jiahao XU 487c590c00 Fix Build::is_flag_supported: Check exit status of the compiler (#757) 2023-01-23 18:02:50 -08:00
Jon Gjengset 88cf549a57 Expose get_archiver and get_ranlib (#763) 2023-01-23 15:47:57 -08:00
Gavin Li 16f051310e Fix "-arch arm64" flag for aarch64-ios-sim (#759) 2023-01-18 23:02:03 -08:00
Yuki Okushi d1054beb31 Merge pull request #769 from keith/ks/update-bitcode-todo 2023-01-12 18:22:19 +09:00
Keith Smiley e7b6f0fea7 Update bitcode TODO
As of Xcode 14 Bitcode is deprecated but Apple still accepts apps built
with bitcode if you're still using Xcode 13. Once Apple stops allowing
you to upload apps built with Xcode 13 this argument should be removed.

https://github.com/rust-lang/cc-rs/pull/768
2023-01-05 09:27:52 -08:00
Mark Rousskov bdb6c44be8 Merge pull request #764 from thomcc/bump-1.0.78
Prep release 1.0.78
2022-12-14 21:25:07 -05:00
Thom Chiovoloni 010f767221 Prep release 1.0.78 2022-12-14 16:31:53 -08:00
Andy Polyakov 7e1c49ff46 Default to llvm-lib when using clang-cl in msvc environment.
The problem is that the vendor librarian can't handle object modules
compiled with clang-cl -flto. llvm-lib on the other hand can handle
any object modules, which makes it a preferred option.
2022-12-01 10:16:25 +00:00
Andy Polyakov a39662c327 Map source absolute paths to OUT_DIR as relative. (#684)
Fixes https://github.com/rust-lang/cc-rs/issues/683
2022-11-23 18:25:33 -08:00
Andy Polyakov 84b43ed002 Update CUDA toolchain. 2022-11-23 13:56:47 -08:00
Andy Polyakov 2cb18754a8 Refine CUDA support.
Instead of counting all source files we count only .cu files, ones with
device code that actually require the special treatment.
2022-11-23 13:56:47 -08:00
Andy Polyakov b1b83df276 Allow to use clang++ with CUDA compiler.
CUDA compiler supports clang++, but it wasn't possible to use it with
cc-rs, because --target option was passed to nvcc instead of clang.
2022-11-23 13:56:47 -08:00
Thom Chiovoloni 835939ca44 Only pass .asm files to masm 2022-11-23 20:33:13 +00:00
Thom Chiovoloni 3f6750a60e Prep release 1.0.77 2022-11-20 17:52:04 -05:00
Nicholas Bishop 71fd20d435 Add Build::asm_flag
The method allows flags to be specified that are only applied to
assembly input files, not C files. This is helpful with clang, which
only accepts certain assembly options if the input file is asm, not C.
2022-11-16 17:52:56 -08:00
Mike Hommey 0d90b42e49 Use a DWARF version consistent with rustc
Rustc defaults to DWARF-2 on some targets, and DWARF-4 on others.
However using -g with the C compiler yields whatever default version the
C compiler prefers.

One side effect is that the DWARF debug info shipped in some libraries
with rustc itself (e.g. libcompiler_builtins and others) have recently
switched to DWARF-5 as a side effect of upgrading the clang version
used on rustc CI. (https://github.com/rust-lang/rust/issues/98746)

Ideally, the preferred DWARF version would be given by the rust compiler
and/or cargo, but that's not the case at the moment, so the next best
thing is something that aligns with the current defaults, although
work in under way to add a rustc flag that would allow to pick the
preferred DWARF version (https://github.com/rust-lang/rust/pull/98350)
2022-11-10 15:03:28 -08:00
Thom Chiovoloni e84e342a36 Prep release 1.0.76 2022-11-08 18:32:42 -05:00
roblabla cff232a034 Don't separate files/opt when using msvc assembler
The MSVC assemblers don't support using `--` to mark the end of the
options and the start of the "verbatim" file list. When the compiler
family is MSVC with clang-cl, the assembler used will be the standard
MSVC assembler.
2022-11-08 14:18:31 -08:00
Thom Chiovoloni 81ad8521cc Prep release 1.0.75 2022-11-08 07:56:05 -05:00
Tom Niget c16f393544 Fix location of atlmfc directory on MSVC 15+
Old code was expecting {VC}\Tools\MSVC\{Version}\bin\x64\atlmfc, correct path is {VC}\Tools\MSVC\{Version}\atlmfc
2022-11-08 05:54:47 +00:00
Chris Denton 83e2278098 Merge pull request #742 from nagisa/ml-debuginfo
Add debuginfo flags for msvc assemblers
2022-11-04 17:51:09 +00:00
Simonas Kazlauskas ed732b51b0 Prefer -ar to -gcc-ar
As observed in https://github.com/cross-rs/cross/issues/1100, in some
situations `*-gcc-ar` might actually be just broken.

I believe this is most likely just a plain bug in gcc (failing to
consider `--disable-lto` configuration option somewhere in their build
setup,) but for the time being `*-ar` tends to avoid this problem
altogether.

Code added in https://github.com/rust-lang/cc-rs/pull/736 appears to be
preferring `*-gcc-ar`, but no strong rationale is given to prefer one
over the other. `*-gcc-ar` being outright broken sometimes seems like a
rationale strong enough to continue preferring binutils’ `ar`.
2022-10-31 15:47:58 -07:00
Simonas Kazlauskas e9998db315 Add debuginfo flags for msvc assemblers
When code is being built with debuginfo, we need to instruct the
assemblers accordingly.
2022-10-31 23:56:21 +02:00
Chris Denton df53498a16 Merge pull request #739 from thomcc/hkey-paranoia
Be more defensive about how windows RegistryKeys are handled
2022-10-31 10:21:01 +00:00
Thom Chiovoloni 4797a8ae5e Adjust comment on HKEY_LOCAL_MACHINE
Co-authored-by: Chris Denton <ChrisDenton@users.noreply.github.com>
2022-10-30 02:50:17 -07:00
Yuki Okushi 2f47324500 Merge pull request #740 from atouchet/url 2022-10-30 12:57:59 +09:00
Alex Touchet cd7767c6ae Update URLs 2022-10-29 19:39:50 -07:00
Thom Chiovoloni f6fb81ce6c Be much more defensive about how windows RegistryKeys are handled 2022-10-29 11:19:35 -07:00
Mark Rousskov 45c5933783 Merge pull request #737 from thomcc/bump-version
Prepare release 1.0.74
2022-10-29 09:59:26 -04:00
Thom Chiovoloni e0b3b9161f Prepare release 1.0.74 2022-10-29 04:38:50 -07:00
Thom Chiovoloni 4e6f564e35 Avoid rerun-if-env-changed on vars set by cargo for build scripts 2022-10-29 04:38:19 -07:00
Thom Chiovoloni 009f9ea8a6 Default emit_rerun_if_env_changed to true 2022-10-29 04:38:19 -07:00
Nathaniel Daniel 523d636cb4 Change getenv to only emit metadata once per var 2022-10-28 21:59:50 -07:00
Nathaniel Daniel 941f3608e4 Run cargo fmt 2022-10-28 21:59:50 -07:00
Nathaniel Daniel e675cb52ba Add option to emit rerun-if-env-changed metadata 2022-10-28 21:59:50 -07:00
Ast-x64 f6f66d44ae Use specified compiler in is_flag_supported
Use the compiler specified instead of the default one to test whether a
flag can be accepted.
Fixes https://github.com/alexcrichton/cc-rs/issues/675.
2022-10-28 21:59:32 -07:00
Jon Gjengset 8eeb941d74 Continue to support binutils ar
sfackler [observed] that the `binutils` package [provides] binaries
named `$target-ar` (with no `-gcc`). This patch augments the change made
in #735 to continue picking those up too.

[observed]: https://github.com/alexcrichton/openssl-src-rs/pull/163#issuecomment-1292439189
[provides]: https://packages.debian.org/bullseye/amd64/binutils-aarch64-linux-gnu/filelist
2022-10-26 14:41:35 -07:00
Mateusz Mikuła 992269547f Add LLVM based MinGW targets 2022-10-26 13:22:18 -07:00
Jon Gjengset bc0c9442e3 Correctly infer ranlib/ar from cross-gcc
The GCC convention is that if the toolchain is named `$target-gnu-gcc`,
then ar will be available as `$target-gnu-gcc-ar`. The code as written
will infer it to be `$target-gnu-ar`, which won't work.

I'm not sure why the code that existed was written the way it was -- I
don't know of any GCC toolchains where the `-gcc` is stripped out in the
name of ar. The file listing on Debian's [GCC 6.x] and [GCC 10.x] all
show the binaries using the `$target-gnu-gcc-ar` format, as does Arch
Linux's [GCC 12.x].

It may seem odd that the code always adds `-gcc` for that match arm, but
this matches what we do for finding `$CC` and `$CXX` where we always
inject the GNU prefix when target != host.

Also note that there isn't a special `ar` for C++, so even when
`self.cpp == true`, we should use `-gcc-ar`.

Our saving grace, and likely the reason bug reports haven't come in
about this, is that we also checks if the resulting binary name is
executable, and if it isn't we fall back to the default AR instead. This
means the bad heuristic is likely often masked by the presence of
another working default AR.

See also alexcrichton/openssl-src-rs#163.

[GCC 6.x]: https://packages.debian.org/stretch/gcc
[GCC 10.x]: https://packages.debian.org/stable/devel/gcc
[GCC 12.x]: https://archlinux.org/packages/core/x86_64/gcc/
2022-10-26 13:21:50 -07:00
Sean Cross e14f15f917 Add support for riscv32imac-unknown-xous-elf
The `riscv32imac-unknown-xous-elf` target is a new Tier 3 platform.

Signed-off-by: Sean Cross <sean@xobs.io>
2022-10-25 22:30:49 -07:00
Andy Polyakov 60f5a20d0e Use RUSTC_LINKER's prefix as last resort for prefix_for_target(). 2022-10-25 20:37:29 -07:00