Skip to content

Commit 64b85d9

Browse files
[PGO][Offload] Don't define entrypoint on Darwin
1 parent e418000 commit 64b85d9

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

compiler-rt/lib/profile/InstrProfilingFile.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,11 +1273,14 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File,
12731273
return 0;
12741274
}
12751275

1276-
COMPILER_RT_GPU_ENTRYPOINT int __llvm_write_custom_profile(
1277-
const char *Target, const __llvm_profile_data *DataBegin,
1278-
const __llvm_profile_data *DataEnd, const char *CountersBegin,
1279-
const char *CountersEnd, const char *NamesBegin, const char *NamesEnd,
1280-
const uint64_t *VersionOverride) {
1276+
#ifdef COMPILER_RT_GPU_ENTRYPOINT
1277+
int __llvm_write_custom_profile(const char *Target,
1278+
const __llvm_profile_data *DataBegin,
1279+
const __llvm_profile_data *DataEnd,
1280+
const char *CountersBegin,
1281+
const char *CountersEnd, const char *NamesBegin,
1282+
const char *NamesEnd,
1283+
const uint64_t *VersionOverride) {
12811284
int ReturnValue = 0, FilenameLength, TargetLength;
12821285
char *FilenameBuf, *TargetFilename;
12831286
const char *Filename;
@@ -1379,5 +1382,6 @@ COMPILER_RT_GPU_ENTRYPOINT int __llvm_write_custom_profile(
13791382

13801383
return ReturnValue;
13811384
}
1385+
#endif
13821386

13831387
#endif

compiler-rt/lib/profile/InstrProfilingPort.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343

4444
#if defined(__APPLE__)
4545
#define COMPILER_RT_SEG "__DATA,"
46-
#define COMPILER_RT_GPU_ENTRYPOINT COMPILER_RT_VISIBILITY
4746
#else
4847
#define COMPILER_RT_SEG ""
4948
#define COMPILER_RT_GPU_ENTRYPOINT

0 commit comments

Comments
 (0)