summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorjan Iversen <jani@libreoffice.org>2017-10-16 20:23:24 +0200
committerjan Iversen <jani@libreoffice.org>2017-10-16 20:26:00 +0200
commitcd5a5c0baecac2832841208034b42724fcfbb49d (patch)
treea94b9709b1ade947bc0eb916a803851a5639bd61 /solenv
parent30c873ed750df42b565ea44b937096d743903b52 (diff)
added -C switch to native-code.py
Android is using this script as well, so the iOS change needs to be hidden behind a flag Change-Id: Ica9064278f0b64ad3f078c7951eef15e39f2b6da
Diffstat (limited to 'solenv')
-rwxr-xr-xsolenv/bin/native-code.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index 886c70a9cbfd..430a429e9b6d 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -408,6 +408,7 @@ opts = OptionParser()
opts.add_option("-j", "--java-guard", action="store_true", help="include external java functions", dest="java", default=False)
opts.add_option("-g", "--group", action="append", help="group of implementations to make available in application", dest="groups")
opts.add_option("-r", "--limit-rdb", action="append", help="instead of outputting native-code.cxx, limit the services.rdb only to the services defined by the groups", dest="services")
+opts.add_option("-C", "--pure-c", action="store_true", help="do not print extern \"C\"", dest="pure_c", default=False)
(options, args) = opts.parse_args()
@@ -447,6 +448,8 @@ print ("""/*
#include <osl/detail/component-mapping.h>
""")
+if not options.pure_c:
+ print ("""extern "C" {""")
for entry in sorted(full_factory_map.keys()):
factory_function = full_factory_map[entry]['function']
@@ -520,5 +523,7 @@ print ("""
}
""")
+if not options.pure_c:
+ print("""}""")
# vim:set shiftwidth=4 softtabstop=4 expandtab: