google / safeside

Understand and mitigate software-observable side-channels
BSD 3-Clause "New" or "Revised" License
498 stars 54 forks source link

Hide compiler-specific code in a new header #20

Closed mmdriley closed 5 years ago

mmdriley commented 5 years ago

For example, we sometimes need noline or always_inline and those are different across compilers. We should have a macro like SAFESIDE_NOINLINE that hides that complexity and shares a definition across different programs.

Inspiration from https://github.com/abseil/abseil-cpp/blob/master/absl/base/attributes.h and https://cs.chromium.org/chromium/src/v8/include/v8config.h

asteinha commented 5 years ago

What name of the header file do you want? directives.h?

mmdriley commented 5 years ago

Up to you. Something descriptive like compiler_support.h or compiler_specifics.h could be okay.