summaryrefslogtreecommitdiffhomepage
path: root/sofort/ccenv/ccenv.sh
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-18 06:33:00 +0000
committermidipix <writeonce@midipix.org>2024-02-18 07:49:54 +0000
commite2a42e3965402623c27e5e5d1c173abdae5651bd (patch)
treecc98c424f5ed8ee9f9cbeaf2b3566611b80c2f12 /sofort/ccenv/ccenv.sh
parent7f9304ee0f1ac5c2aa48109603a6dd5e90348216 (diff)
downloadpemagine-e2a42e3965402623c27e5e5d1c173abdae5651bd.tar.bz2
pemagine-e2a42e3965402623c27e5e5d1c173abdae5651bd.tar.xz
build system: ccenv: detect compiler support of visibility attributes.
Diffstat (limited to 'sofort/ccenv/ccenv.sh')
-rw-r--r--sofort/ccenv/ccenv.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index a13aa07..0f7f486 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -1654,6 +1654,25 @@ ccenv_set_cc_linker_switch_vars()
done
}
+ccenv_set_cc_attr_visibility_vars()
+{
+ if cfgtest_attr_visibility 'default'; then
+ ccenv_attr_visibility_default="$mb_cfgtest_attr"
+ fi
+
+ if cfgtest_attr_visibility 'hidden'; then
+ ccenv_attr_visibility_hidden="$mb_cfgtest_attr"
+ fi
+
+ if cfgtest_attr_visibility 'internal'; then
+ ccenv_attr_visibility_internal="$mb_cfgtest_attr"
+ fi
+
+ if cfgtest_attr_visibility 'protected'; then
+ ccenv_attr_visibility_protected="$mb_cfgtest_attr"
+ fi
+}
+
ccenv_dso_verify()
{
ccenv_str='int foo(int x){return ++x;}'
@@ -1760,6 +1779,7 @@ ccenv_set_toolchain_variables()
ccenv_set_os_dso_linkage
ccenv_set_os_dso_patterns
ccenv_set_os_pe_switches
+ ccenv_set_cc_attr_visibility_vars
ccenv_output_defs
ccenv_clean_up