Skip to content

Commit 48f447a

Browse files
[9.0.2] Include both windows and unix files in embedded_zipper_sources (#29235)
### Description This filegroup is being built for user's exec platform, which can be different from bazel's platform (= user's host platform). The `select()` selects with bazel's platform, making it impossible to build bazel's internal tools for a different platform. ### Motivation This fixes the "input file not found" error when building with a remote execution platform that is different from the host. ### Build API Changes No ### Checklist - [ ] I have added tests for the new use cases (if any). - [ ] I have updated the documentation (if applicable). ### Release Notes RELNOTES: None Closes #29057. PiperOrigin-RevId: 890318692 Change-Id: Ibfd0ae8d934e2e0ca9726a0ee907b4791c346504 --------- Co-authored-by: Zach Yu <zachyu@google.com>
1 parent f2fd8ea commit 48f447a

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/main/cpp/util/port.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,10 @@ char (&ArraySizeHelper(const T (&array)[N]))[N];
141141
// either by making PID handling platform-independent or some other idea; remove
142142
// the following typedef afterwards.
143143
#ifndef __MINGW32__
144+
#ifndef _PID_T_
145+
#define _PID_T_
144146
typedef int pid_t;
147+
#endif // _PID_T_
145148
#endif // __MINGW32__
146149
#endif // _WIN32
147150

third_party/ijar/BUILD

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,16 @@ filegroup(
101101
"BUILD",
102102
"common.h",
103103
"mapped_file.h",
104+
"mapped_file_unix.cc",
105+
"mapped_file_windows.cc",
104106
"platform_utils.cc",
105107
"platform_utils.h",
106108
"zip.cc",
107109
"zip.h",
108110
"zip_main.cc",
109111
"zlib_client.cc",
110112
"zlib_client.h",
111-
] + select({
112-
"//src/conditions:windows": [
113-
"mapped_file_windows.cc",
114-
],
115-
"//conditions:default": [
116-
"mapped_file_unix.cc",
117-
],
118-
}),
113+
],
119114
visibility = ["//visibility:public"],
120115
)
121116

0 commit comments

Comments
 (0)