rust/compiler
bors 15a242a432 Auto merge of #90791 - drmorr0:drmorr-memcmp-cint-cfg, r=petrochenkov
make memcmp return a value of c_int_width instead of i32

This is an attempt to fix #32610 and #78022, namely, that `memcmp` always returns an `i32` regardless of the platform.  I'm running into some issues and was hoping I could get some help.

Here's what I've been attempting so far:

1. Build the stage0 compiler with all the changes _expect_ for the changes in `library/core/src/slice/cmp.rs` and `compiler/rustc_codegen_llvm/src/context.rs`; this is because `target_c_int_width` isn't passed through and recognized as a valid config option yet.  I'm building with `./x.py build --stage 0 library/core library/proc_macro compiler/rustc`
2. Next I add in the `#[cfg(c_int_width = ...)]` params to `cmp.rs` and `context.rs` and build the stage 1 compiler by running `./x.py build --keep-stage 0 --stage 1 library/core library/proc_macro compiler/rustc`.  This step now runs successfully.
3. Lastly, I try to build the test program for AVR mentioned in #78022 with `RUSTFLAGS="--emit llvm-ir" cargo build --release`, and look at the resulting llvm IR, which still shows:

```
...
%11 = call addrspace(1) i32 `@memcmp(i8*` nonnull %5, i8* nonnull %10, i16 5) #7, !dbg !1191                                                                                                                                                                                                                                %.not = icmp eq i32 %11, 0, !dbg !1191
...
; Function Attrs: nounwind optsize                                                                                                                                                                                                                                                                                          declare i32 `@memcmp(i8*,` i8*, i16) local_unnamed_addr addrspace(1) #4
```

Any ideas what I'm missing here?  Alternately, if this is totally the wrong approach I'm open to other suggestions.

cc `@Rahix`
2022-04-03 11:16:22 +00:00
..
rustc Propagate parallel_compiler feature through rustc crates. Turned off feature gives change of builded crates: 238 -> 224. 2022-03-28 08:41:12 +03:00
rustc_apfloat Addressed comments by @compiler-errors and @bjorn3 2022-03-30 17:04:46 -04:00
rustc_arena mark FIXMES for all the places found that are probably offset_from 2022-03-29 20:18:28 -04:00
rustc_ast Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_ast_lowering Record item-likes in ItemLowerer. 2022-03-31 13:48:16 +02:00
rustc_ast_passes Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
rustc_ast_pretty Remove Nonterminal::NtTT. 2022-03-28 10:03:02 +11:00
rustc_attr Rollup merge of #94948 - jhpratt:rustc_deprecated, r=Dylan-DPC 2022-03-20 09:14:59 +01:00
rustc_borrowck update comment 2022-03-31 15:41:52 +02:00
rustc_builtin_macros Spellchecking some comments 2022-03-30 01:39:38 -04:00
rustc_codegen_cranelift Addressed comments by @compiler-errors and @bjorn3 2022-03-30 17:04:46 -04:00
rustc_codegen_gcc make memcmp return a value of c_int_width instead of i32 2022-04-02 17:21:08 -07:00
rustc_codegen_llvm make memcmp return a value of c_int_width instead of i32 2022-04-02 17:21:08 -07:00
rustc_codegen_ssa Auto merge of #90791 - drmorr0:drmorr-memcmp-cint-cfg, r=petrochenkov 2022-04-03 11:16:22 +00:00
rustc_const_eval Auto merge of #94883 - cjgillot:flat-metadata, r=oli-obk 2022-04-01 21:16:41 +00:00
rustc_data_structures Auto merge of #95466 - Dylan-DPC:rollup-g7ddr8y, r=Dylan-DPC 2022-03-30 07:45:42 +00:00
rustc_driver Address review comments and add a test 2022-04-02 17:26:39 +02:00
rustc_error_codes rework error messages for incorrect inherent impls 2022-03-30 11:23:58 +02:00
rustc_errors Spellchecking some comments 2022-03-30 01:39:38 -04:00
rustc_expand Auto merge of #95509 - nnethercote:simplify-MatcherPos-some-more, r=petrochenkov 2022-04-02 04:59:16 +00:00
rustc_feature Rollup merge of #94869 - jackh726:gats_extended, r=compiler-errors 2022-03-31 00:26:29 +02:00
rustc_fs_util
rustc_graphviz eplace usages of vec![].into_iter with [].into_iter 2022-01-09 14:09:25 +11:00
rustc_hir Store next_disambiguator in Definitions. 2022-03-31 13:34:54 +02:00
rustc_hir_pretty resolve: Fix incorrect results of opt_def_kind query for some built-in macros 2022-02-24 22:54:36 +03:00
rustc_incremental Spellchecking some comments 2022-03-30 01:39:38 -04:00
rustc_index Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_infer Rollup merge of #95560 - lcnr:obligation-cause, r=oli-obk 2022-04-02 03:34:27 +02:00
rustc_interface Address review comments and add a test 2022-04-02 17:26:39 +02:00
rustc_lexer Reduce max hash in raw strings from u16 to u8 2022-03-23 22:13:55 +01:00
rustc_lint invalid_value lint: detect invalid initialization of arrays 2022-04-01 09:59:11 -04:00
rustc_lint_defs Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_llvm Stabilize native library modifier syntax and the whole-archive modifier specifically 2022-03-30 23:53:21 +03:00
rustc_log Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
rustc_macros add #[rustc_pass_by_value] to more types 2022-03-08 15:39:52 +01:00
rustc_metadata Merge impl_constness and is_const_fn_raw. 2022-03-31 18:33:46 +02:00
rustc_middle Auto merge of #95537 - GuillaumeGomez:type_of-doc, r=Dylan-DPC 2022-04-02 12:13:11 +00:00
rustc_mir_build obligation cause: RepeatVec -> RepeatValueCopy 2022-03-31 12:51:46 +02:00
rustc_mir_dataflow Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_mir_transform Less manipulation of the callee_def_id. 2022-04-02 23:28:09 +02:00
rustc_monomorphize Rollup merge of #95478 - InfRandomness:infrandomness/lint_largemove_note, r=compiler-errors 2022-03-31 13:09:53 +02:00
rustc_parse Auto merge of #88672 - camelid:inc-parser-sugg, r=davidtwco 2022-04-03 05:24:20 +00:00
rustc_parse_format Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_passes Rollup merge of #95544 - jam1garner:improve-naked-noreturn-diagnostic, r=tmiasko 2022-04-02 03:34:23 +02:00
rustc_plugin_impl
rustc_privacy Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_query_impl rework implementation for inherent impls for builtin types 2022-03-30 11:23:58 +02:00
rustc_query_system Spellchecking compiler comments 2022-03-30 15:14:15 -04:00
rustc_resolve Stop emitting lints during lowering. 2022-03-31 13:46:06 +02:00
rustc_save_analysis Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_serialize Delete Decoder::read_unit 2022-02-22 18:14:51 -05:00
rustc_session ast_lowering: Stop wrapping ident matchers into groups 2022-04-02 00:09:34 +03:00
rustc_span Rollup merge of #95497 - nyurik:compiler-spell-comments, r=compiler-errors 2022-03-31 04:57:28 +02:00
rustc_symbol_mangling resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
rustc_target Rollup merge of #95430 - ChrisDenton:disable-tls-i686-msvc, r=nagisa 2022-04-02 03:34:22 +02:00
rustc_trait_selection Auto merge of #94911 - jackh726:gats_extended_2, r=compiler-errors 2022-04-02 18:34:26 +00:00
rustc_traits Remove opaque type obligation and just register opaque types as they are encountered. 2022-03-28 16:57:45 +00:00
rustc_ty_utils Auto merge of #94883 - cjgillot:flat-metadata, r=oli-obk 2022-04-01 21:16:41 +00:00
rustc_type_ir Revert "Auto merge of #93893 - oli-obk:sad_revert, r=oli-obk" 2022-03-28 16:27:14 +00:00
rustc_typeck Rollup merge of #95560 - lcnr:obligation-cause, r=oli-obk 2022-04-02 03:34:27 +02:00