diff options
author | Martin Storsjö <martin@martin.st> | 2018-02-21 22:38:15 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2018-02-22 05:14:36 +0000 |
commit | b97765efd452921f75c1d04820c4b5e9e9d49100 (patch) | |
tree | b8b1143da9074ccb447f841c1b9b95088afba5f6 /src/testlib | |
parent | 02eb264aa2db20fac479a749c39044cc9ed304b2 (diff) |
moc: Only use the init_priority attribute when targeting windows
While both GCC and the GCC compatible clang support this attribute in
general, GCC doesn't support it when targeting macOS, ending up with
errors like these:
error: 'init_priority' attribute is not supported on this platform
This error isn't a property of the platform itself though, since
clang supports the attribute just fine on macOS.
The attribute is only used to work around an issue with dllimport
on windows, so limit its use to that platform, to avoid issues
with it potentially being unsupported on platforms other than
macOS as well.
This fixes compiling with GCC for macOS.
Change-Id: I0235e6365635d73233951566c10ad869b26a0fc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/testlib')
0 files changed, 0 insertions, 0 deletions