Andreas Klebinger pushed to branch wip/andreask/9.10.4-batch1 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • rts/RtsFlags.h
    ... ... @@ -24,7 +24,12 @@ void initRtsFlagsDefaults (void);
    24 24
     void setupRtsFlags        (int *argc, char *argv[], RtsConfig rtsConfig);
    
    25 25
     void freeRtsArgs          (void);
    
    26 26
     bool is_io_mng_native_p   (void);
    
    27
    -#if defined(PROFILING)
    
    27
    +
    
    28
    +/* These prototypes may also be defined by ClosureMacros.h. We don't want to
    
    29
    + * define them twice (#24918).
    
    30
    + */
    
    31
    +#if defined(PROFILING) && !defined(RTS_FLAGS_DOING_PROFILING)
    
    32
    +#define RTS_FLAGS_DOING_PROFILING 1
    
    28 33
     bool doingLDVProfiling (void);
    
    29 34
     bool doingRetainerProfiling(void);
    
    30 35
     bool doingErasProfiling(void);
    

  • rts/include/rts/storage/ClosureMacros.h
    ... ... @@ -152,10 +152,16 @@ EXTERN_INLINE StgHalfWord GET_TAG(const StgClosure *con)
    152 152
       be duplicated here, otherwise there will be some
    
    153 153
       -Wimplicit-function-declaration compilation errors. Especially when
    
    154 154
       GHC compiles out-of-tree cbits that rely on SET_HDR in RTS API.
    
    155
    +
    
    156
    +  However when RtsFlags.h is imported, we don't want to redefine them to avoid
    
    157
    +  spurious warnings (#24918).
    
    155 158
     */
    
    159
    +#if !defined(RTS_FLAGS_DOING_PROFILING)
    
    160
    +#define RTS_FLAGS_DOING_PROFILING 1
    
    156 161
     bool doingLDVProfiling(void);
    
    157 162
     bool doingRetainerProfiling(void);
    
    158 163
     bool doingErasProfiling(void);
    
    164
    +#endif
    
    159 165
     
    
    160 166
     /*
    
    161 167
       The following macro works for both retainer profiling and LDV profiling. For