[libc-commits] [libc] [libc] reverts for 32b arm (PR #78307)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Jan 16 08:21:47 PST 2024


https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/78307

- Revert "[libc] temporarily set -Wno-shorten-64-to-32 (#77396)"
- Revert "[libc] make off_t 32b for 32b arm (#77350)"


>From 5c5212887ea003caf2ba688e362996017cf281d6 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 16 Jan 2024 08:18:18 -0800
Subject: [PATCH 1/2] Revert "[libc] temporarily set -Wno-shorten-64-to-32
 (#77396)"

This reverts commit 70cea91e0fc93db618069588e6a06314b2b0e2d3.

The correct fix was
commit f1f1875c18b8 ("[libc][cmake] reset COMPILE_DEFINITIONS (#77810)")

Link: #77395
---
 libc/src/sys/mman/linux/CMakeLists.txt | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libc/src/sys/mman/linux/CMakeLists.txt b/libc/src/sys/mman/linux/CMakeLists.txt
index 08694ec48be397..163e7dead8887a 100644
--- a/libc/src/sys/mman/linux/CMakeLists.txt
+++ b/libc/src/sys/mman/linux/CMakeLists.txt
@@ -22,9 +22,6 @@ add_entrypoint_object(
     libc.include.sys_syscall
     libc.src.__support.OSUtil.osutil
     libc.src.errno.errno
-  COMPILE_OPTIONS
-    # TODO: https://github.com/llvm/llvm-project/issues/77395
-    -Wno-shorten-64-to-32
 )
 
 add_entrypoint_object(

>From 24bc6a00090f99350febada081499e922e992f95 Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 16 Jan 2024 08:19:13 -0800
Subject: [PATCH 2/2] Revert "[libc] make off_t 32b for 32b arm (#77350)"

This reverts commit ce1305a3cea42dad8dd6ee5606dd4259e8632953.

The correct fix was
commit f1f1875c18b8 ("[libc][cmake] reset COMPILE_DEFINITIONS (#77810)")

Link: #77395
---
 libc/include/llvm-libc-types/off_t.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/libc/include/llvm-libc-types/off_t.h b/libc/include/llvm-libc-types/off_t.h
index a0cbe992189d00..111b29aa68d875 100644
--- a/libc/include/llvm-libc-types/off_t.h
+++ b/libc/include/llvm-libc-types/off_t.h
@@ -9,10 +9,6 @@
 #ifndef __LLVM_LIBC_TYPES_OFF_T_H__
 #define __LLVM_LIBC_TYPES_OFF_T_H__
 
-#if defined(__LP64__) || defined(__riscv)
 typedef __INT64_TYPE__ off_t;
-#else
-typedef __INT32_TYPE__ off_t;
-#endif // __LP64__ || __riscv
 
 #endif // __LLVM_LIBC_TYPES_OFF_T_H__



More information about the libc-commits mailing list