Add inlinesvisibility API + implement for gcc
This commit is contained in:
parent
2dfa956d2b
commit
259f11846b
@ -1378,6 +1378,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
api.register {
|
||||
name = "inlinesvisibility",
|
||||
scope = "config",
|
||||
kind = "string",
|
||||
allowed = {
|
||||
"Default",
|
||||
"Hidden"
|
||||
}
|
||||
}
|
||||
|
||||
-----------------------------------------------------------------------------
|
||||
--
|
||||
-- Field name aliases for backward compatibility
|
||||
|
@ -177,6 +177,9 @@
|
||||
Hidden = "-fvisibility=hidden",
|
||||
Internal = "-fvisibility=internal",
|
||||
Protected = "-fvisibility=protected",
|
||||
},
|
||||
inlinesvisibility = {
|
||||
Hidden = "-fvisibility-inlines-hidden"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -867,3 +867,21 @@
|
||||
test.excludes({ "-fvisibility=protected" }, gcc.getcflags(cfg))
|
||||
test.contains({ "-fvisibility=protected" }, gcc.getcxxflags(cfg))
|
||||
end
|
||||
|
||||
--
|
||||
-- Test inlines visibility flags.
|
||||
--
|
||||
|
||||
function suite.cxxflags_onInlinesVisibilityDefault()
|
||||
inlinesvisibility "Default"
|
||||
prepare()
|
||||
test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcflags(cfg))
|
||||
test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcxxflags(cfg))
|
||||
end
|
||||
|
||||
function suite.cxxflags_onInlinesVisibilityHidden()
|
||||
inlinesvisibility "Hidden"
|
||||
prepare()
|
||||
test.excludes({ "-fvisibility-inlines-hidden" }, gcc.getcflags(cfg))
|
||||
test.contains({ "-fvisibility-inlines-hidden" }, gcc.getcxxflags(cfg))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user