Skip to content

Commit

Permalink
Support clang.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84906 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
kalibera committed Aug 8, 2023
1 parent c199e77 commit c58a51b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/gnuwin32/system.c
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,11 @@ void R_SetWin32(Rstart Rp)
char *gccversion = (char *)malloc(30);
if (!gccversion)
R_Suicide("Allocation error");
#ifdef __clang__
snprintf(gccversion, 30, "R_COMPILED_BY=clang %d.%d.%d", __clang_major__, __clang_minor__, __clang_patchlevel__);
#else
snprintf(gccversion, 30, "R_COMPILED_BY=gcc %d.%d.%d", __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
#endif
putenv(gccversion);
/* no free here: storage remains in use */

Expand Down

0 comments on commit c58a51b

Please sign in to comment.