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

Enable profiler in rustc on darwin #352990

Open
Artturin opened this issue Nov 1, 2024 · 0 comments
Open

Enable profiler in rustc on darwin #352990

Artturin opened this issue Nov 1, 2024 · 0 comments
Labels
0.kind: enhancement Add something new 6.topic: darwin Running or building packages on Darwin 6.topic: rust

Comments

@Artturin
Copy link
Member

Artturin commented Nov 1, 2024

Attempted in #314832

Fails with

cargo:warning=clang-16: warning: argument unused during compilation: '-mmacos-version-min=11.0' [-Wunused-command-line-argument]
cargo:warning=clang-16: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-argument]
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:24:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/errno.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/errno.h:72:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:828:2: error: Unsupported architecture
cargo:warning=#error Unsupported architecture
cargo:warning= ^
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:25:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/fcntl.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:78:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:33:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/_types.h:36:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:25:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/fcntl.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:78:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t       __darwin_dev_t;         /* dev_t */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
cargo:warning=typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
cargo:warning=        ^
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'; did you mean '__int128_t'?
cargo:warning=typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
cargo:warning=typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
cargo:warning=        ^
cargo:warning=note: '__int128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
cargo:warning=typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
cargo:warning=        ^
cargo:warning=note: '__uint128_t' declared here
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:25:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/fcntl.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:83:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
cargo:warning=typedef __darwin_size_t        size_t;
cargo:warning=        ^
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:25:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/fcntl.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:358:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h:31:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/machine/types.h:39:2: error: architecture not supported
cargo:warning=#error architecture not supported
cargo:warning= ^
cargo:warning=In file included from /private/tmp/nix-build-rustc-1.82.0.drv-0/rustc-1.82.0-src/src/llvm-project/compiler-rt/lib/profile/GCDAProfiling.c:25:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/fcntl.h:23:
cargo:warning=In file included from /nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/fcntl.h:358:
cargo:warning=/nix/store/4s8z8il6zyq77ixy4b8kfzwsnz90vsrm-apple-sdk-11.3/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types/_timespec.h:35:2: error: unknown type name '__darwin_time_t'
cargo:warning=        __darwin_time_t tv_sec;
cargo:warning=        ^
cargo:warning=fatal error: too many errors emitted, stopping now [-ferror-limit=]
cargo:warning=20 errors generated.

Already tested if #346043 would fix it but it didn't

@Artturin Artturin added 0.kind: enhancement Add something new 6.topic: darwin Running or building packages on Darwin 6.topic: rust labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new 6.topic: darwin Running or building packages on Darwin 6.topic: rust
Projects
None yet
Development

No branches or pull requests

1 participant