diff options
author | David Tolnay <dtolnay@gmail.com> | 2023-05-03 17:47:38 -0700 |
---|---|---|
committer | David Tolnay <dtolnay@gmail.com> | 2023-05-03 17:49:11 -0700 |
commit | 0f66de46d5a9ff2e44def4dad1217f7aee073f36 (patch) | |
tree | a8625a693e092373b2cc552ee54deace7750701b /third-party | |
parent | cfd96b84614974149328c89c97015a01e318d1f7 (diff) | |
download | cxx-0f66de46d5a9ff2e44def4dad1217f7aee073f36.tar.gz |
Create target to run winapi build script
This happens if you do not run the build script:
Stderr: error[E0432]: unresolved import `shared::basetsd`
--> third-party\winapi-0.3.9.crate/src\shared\minwindef.rs:8:13
|
8 | use shared::basetsd::{LONG_PTR, UINT_PTR};
| ^^^^^^^ could not find `basetsd` in `shared`
error[E0432]: unresolved import `shared::ntdef`
--> third-party\winapi-0.3.9.crate/src\shared\minwindef.rs:9:13
|
9 | use shared::ntdef::{HANDLE, LONG};
| ^^^^^ could not find `ntdef` in `shared`
error[E0432]: unresolved import `shared::wtypesbase`
--> third-party\winapi-0.3.9.crate/src\shared\winerror.rs:9:13
|
9 | use shared::wtypesbase::SCODE;
| ^^^^^^^^^^ could not find `wtypesbase` in `shared`
error[E0432]: unresolved import `um::wincontypes`
--> third-party\winapi-0.3.9.crate/src\um\consoleapi.rs:9:9
|
9 | use um::wincontypes::{COORD, HPCON, PINPUT_RECORD};
| ^^^^^^^^^^^ could not find `wincontypes` in `um`
error[E0432]: unresolved import `shared::basetsd`
--> third-party\winapi-0.3.9.crate/src\um\errhandlingapi.rs:7:13
|
7 | use shared::basetsd::ULONG_PTR;
| ^^^^^^^ could not find `basetsd` in `shared`
error[E0432]: unresolved import `um::minwinbase`
--> third-party\winapi-0.3.9.crate/src\um\fileapi.rs:11:9
|
11 | use um::minwinbase::{
| ^^^^^^^^^^ could not find `minwinbase` in `um`
error[E0432]: unresolved import `shared::basetsd`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:8:13
|
8 | use shared::basetsd::{
| ^^^^^^^ could not find `basetsd` in `shared`
error[E0432]: unresolved import `shared::windef`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:18:13
|
18 | use shared::windef::HWND;
| ^^^^^^ could not find `windef` in `shared`
error[E0432]: unresolved import `um::cfgmgr32`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:19:9
|
19 | use um::cfgmgr32::MAX_PROFILE_LEN;
| ^^^^^^^^ could not find `cfgmgr32` in `um`
error[E0432]: unresolved import `um::libloaderapi`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:21:9
|
21 | use um::libloaderapi::{
| ^^^^^^^^^^^^ could not find `libloaderapi` in `um`
error[E0432]: unresolved import `um::minwinbase`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:24:9
|
24 | use um::minwinbase::{
| ^^^^^^^^^^ could not find `minwinbase` in `um`
error[E0432]: unresolved import `um::processthreadsapi`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:28:9
|
28 | use um::processthreadsapi::{
| ^^^^^^^^^^^^^^^^^ could not find `processthreadsapi` in `um`
error[E0432]: unresolved import `vc::vadefs`
--> third-party\winapi-0.3.9.crate/src\um\winbase.rs:47:9
|
47 | use vc::vadefs::va_list;
| ^^^^^^ could not find `vadefs` in `vc`
error[E0432]: unresolved import `shared::windef`
--> third-party\winapi-0.3.9.crate/src\um\wincon.rs:10:13
|
10 | use shared::windef::{COLORREF, HWND};
| ^^^^^^ could not find `windef` in `shared`
error[E0432]: unresolved import `um::minwinbase`
--> third-party\winapi-0.3.9.crate/src\um\wincon.rs:11:9
|
11 | use um::minwinbase::SECURITY_ATTRIBUTES;
| ^^^^^^^^^^ could not find `minwinbase` in `um`
error[E0432]: unresolved import `um::wingdi`
--> third-party\winapi-0.3.9.crate/src\um\wincon.rs:12:9
|
12 | use um::wingdi::LF_FACESIZE;
| ^^^^^^ could not find `wingdi` in `um`
error[E0432]: unresolved import `um::wincontypes`
--> third-party\winapi-0.3.9.crate/src\um\wincon.rs:18:13
|
18 | pub use um::wincontypes::{
| ^^^^^^^^^^^ could not find `wincontypes` in `um`
error[E0432]: unresolved import `shared::basetsd`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:9:13
|
9 | use shared::basetsd::{
| ^^^^^^^ could not find `basetsd` in `shared`
error[E0432]: unresolved import `shared::ktmtypes`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:13:13
|
13 | use shared::ktmtypes::UOW;
| ^^^^^^^^ could not find `ktmtypes` in `shared`
error[E0432]: unresolved import `vc::excpt`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:17:9
|
17 | use vc::excpt::EXCEPTION_DISPOSITION;
| ^^^^^ could not find `excpt` in `vc`
error[E0432]: unresolved import `vc::vcruntime`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:18:9
|
18 | use vc::vcruntime::size_t;
| ^^^^^^^^^ could not find `vcruntime` in `vc`
error[E0432]: unresolved import `shared::ntdef`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:151:17
|
151 | pub use shared::ntdef::LARGE_INTEGER;
| ^^^^^ could not find `ntdef` in `shared`
error[E0432]: unresolved import `shared::ntdef`
--> third-party\winapi-0.3.9.crate/src\um\winnt.rs:153:17
|
153 | pub use shared::ntdef::ULARGE_INTEGER;
| ^^^^^ could not find `ntdef` in `shared`
error[E0432]: unresolved imports `shared::ntdef`, `um::winnt::LARGE_INTEGER`, `um::winnt::LARGE_INTEGER`, `um::winnt::ULARGE_INTEGER`
--> third-party\winapi-0.3.9.crate/src\um\fileapi.rs:17:64
|
17 | BOOLEAN, CCHAR, FILE_ID_128, FILE_SEGMENT_ELEMENT, HANDLE, LARGE_INTEGER, LONG, LONGLONG,
| ^^^^^^^^^^^^^
|
::: third-party\winapi-0.3.9.crate/src\um\winnt.rs:159:17
|
159 | pub use shared::ntdef::LUID;
| ^^^^^ could not find `ntdef` in `shared`
|
::: third-party\winapi-0.3.9.crate/src\um\winbase.rs:34:5
|
34 | LARGE_INTEGER, LATENCY_TIME, LONG, LPCCH, LPCH, LPCSTR, LPCWSTR, LPOSVERSIONINFOEXA,
| ^^^^^^^^^^^^^
...
42 | THREAD_BASE_PRIORITY_MAX, THREAD_BASE_PRIORITY_MIN, ULARGE_INTEGER, VOID, WAITORTIMERCALLBACK,
| ^^^^^^^^^^^^^^
error[E0204]: the trait `Copy` may not be implemented for this type
--> third-party\winapi-0.3.9.crate/src\macros.rs:389:29
|
389 | #[repr(C)] #[derive(Copy)] $(#[$attrs])*
| ^^^^
390 | pub struct $name {
391 | $(pub $field: $ftype,)+
| ------------------ this field does not implement `Copy`
|
::: third-party\winapi-0.3.9.crate/src\um\winbase.rs:2405:1
|
2405 | / STRUCT!{struct HW_PROFILE_INFOA {
2406 | | dwDockInfo: DWORD,
2407 | | szHwProfileGuid: [CHAR; HW_PROFILE_GUIDLEN],
2408 | | szHwProfileName: [CHAR; MAX_PROFILE_LEN],
2409 | | }}
| |__- in this macro invocation
|
= note: this error originates in the derive macro `Copy` which comes from the expansion of the macro `STRUCT` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0204]: the trait `Copy` may not be implemented for this type
--> third-party\winapi-0.3.9.crate/src\macros.rs:389:29
|
389 | #[repr(C)] #[derive(Copy)] $(#[$attrs])*
| ^^^^
390 | pub struct $name {
391 | $(pub $field: $ftype,)+
| ------------------ this field does not implement `Copy`
|
::: third-party\winapi-0.3.9.crate/src\um\winbase.rs:2411:1
|
2411 | / STRUCT!{struct HW_PROFILE_INFOW {
2412 | | dwDockInfo: DWORD,
2413 | | szHwProfileGuid: [WCHAR; HW_PROFILE_GUIDLEN],
2414 | | szHwProfileName: [WCHAR; MAX_PROFILE_LEN],
2415 | | }}
| |__- in this macro invocation
|
= note: this error originates in the derive macro `Copy` which comes from the expansion of the macro `STRUCT` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0204]: the trait `Copy` may not be implemented for this type
--> third-party\winapi-0.3.9.crate/src\macros.rs:389:29
|
389 | #[repr(C)] #[derive(Copy)] $(#[$attrs])*
| ^^^^
390 | pub struct $name {
391 | $(pub $field: $ftype,)+
| ------------------ this field does not implement `Copy`
|
::: third-party\winapi-0.3.9.crate/src\um\wincon.rs:78:1
|
78 | / STRUCT!{struct CONSOLE_FONT_INFOEX {
79 | | cbSize: ULONG,
80 | | nFont: DWORD,
81 | | dwFontSize: COORD,
... |
84 | | FaceName: [WCHAR; LF_FACESIZE],
85 | | }}
| |__- in this macro invocation
|
= note: this error originates in the derive macro `Copy` which comes from the expansion of the macro `STRUCT` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 27 previous errors
Some errors have detailed explanations: E0204, E0432.
For more information about an error, try `rustc --explain E0204`.
Diffstat (limited to 'third-party')
-rw-r--r-- | third-party/BUCK | 44 | ||||
-rw-r--r-- | third-party/fixups/winapi/fixups.toml | 3 |
2 files changed, 46 insertions, 1 deletions
diff --git a/third-party/BUCK b/third-party/BUCK index 945ad9b7..cd72f529 100644 --- a/third-party/BUCK +++ b/third-party/BUCK @@ -465,10 +465,54 @@ cargo.rust_library( "winerror", "winnt", ], + rustc_flags = [ + "--cap-lints=allow", + "@$(location :winapi-0.3.9-build-script-run[rustc_flags])", + ], + visibility = [], +) + +cargo.rust_binary( + name = "winapi-0.3.9-build-script-build", + srcs = [":winapi-0.3.9.crate"], + crate = "build_script_build", + crate_root = "winapi-0.3.9.crate/build.rs", + edition = "2015", + features = [ + "consoleapi", + "errhandlingapi", + "fileapi", + "minwindef", + "processenv", + "std", + "winbase", + "wincon", + "winerror", + "winnt", + ], rustc_flags = ["--cap-lints=allow"], visibility = [], ) +buildscript_run( + name = "winapi-0.3.9-build-script-run", + package_name = "winapi", + buildscript_rule = ":winapi-0.3.9-build-script-build", + features = [ + "consoleapi", + "errhandlingapi", + "fileapi", + "minwindef", + "processenv", + "std", + "winbase", + "wincon", + "winerror", + "winnt", + ], + version = "0.3.9", +) + http_archive( name = "winapi-util-0.1.5.crate", sha256 = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178", diff --git a/third-party/fixups/winapi/fixups.toml b/third-party/fixups/winapi/fixups.toml index db40d72c..5e026f75 100644 --- a/third-party/fixups/winapi/fixups.toml +++ b/third-party/fixups/winapi/fixups.toml @@ -1 +1,2 @@ -buildscript = [] +[[buildscript]] +[buildscript.rustc_flags] |