From cd5a5c0baecac2832841208034b42724fcfbb49d Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Mon, 16 Oct 2017 20:23:24 +0200 Subject: 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 --- solenv/bin/native-code.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'solenv') 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 """) +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: -- cgit