Hi,
I've been trying to build tcmalloc with clang 8 to no avail. The compilation error is:
tcmalloc/internal/percpu_tcmalloc.h:255:7: error: 'asm goto' constructs are not supported yet
asm goto(
The problem seems to be the following check
#ifdef PERCPU_USE_RSEQ_ASM_GOTO
asm goto(
#else
and specifically the fact that PERCPU_USE_RSEQ_ASM_GOTO is always defined but has different values: 1 or 0. In my case I have it defined as 0 from here:
42
43 #else
44 #define PERCPU_USE_RSEQ_ASM_GOTO 0 # <<<<<<<<<<<<<<<<
45 #endif
46 #else
47 #define PERCPU_USE_RSEQ_ASM_GOTO 0
48 #endif
You can easily reproduce the issue
#include <iostream>
#if 0
#define PERCPU_USE_RSEQ_ASM_GOTO 1
#else
#define PERCPU_USE_RSEQ_ASM_GOTO 0
#endif
int
main()
{
#ifdef PERCPU_USE_RSEQ_ASM_GOTO
std::cout << "defined, value: " << PERCPU_USE_RSEQ_ASM_GOTO << std::endl;
#endif
}
Hi,
I've been trying to build tcmalloc with clang 8 to no avail. The compilation error is:
The problem seems to be the following check
and specifically the fact that PERCPU_USE_RSEQ_ASM_GOTO is always defined but has different values: 1 or 0. In my case I have it defined as 0 from here:
You can easily reproduce the issue