X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=abs;h=668453aaebd7fe442e7cd6f004dd5d4e1c76f881;hb=4b82b148d8f39fa78f83dbed7508779113bf545d;hp=d2b5312f2c9c4282c15d620d1587988a05e6ffd5;hpb=42eb48064b15cc43d79d9c417d781d7683c8551e;p=scm%2Fmeta%2Fabs.git diff --git a/abs b/abs index d2b5312..668453a 100755 --- a/abs +++ b/abs @@ -566,6 +566,17 @@ class Source(object): mydict['path'] = path return mydict + def set_user_options(self, c_opts=None, cpp_opts=None, link_opts=None): + if c_opts is not None: + os.environ['USER_C_OPTS'] = c_opts + print 'Set USER_C_OPTS=[%s]' % os.getenv('USER_C_OPTS') + if cpp_opts is not None: + os.environ['USER_CPP_OPTS'] = cpp_opts + print 'Set USER_CPP_OPTS=[%s]' % os.getenv('USER_CPP_OPTS') + if link_opts is not None: + os.environ['USER_LINK_OPTS'] = link_opts + print 'Set USER_LINK_OPTS=[%s]' % os.getenv('USER_LINK_OPTS') + def pre_process(self): if os.path.isfile(os.path.join(self.workspace, self.multi_conf_file)): @@ -605,6 +616,12 @@ def argument_parsing(argv): build.add_argument('--sdkpath', action='store', dest='sdkpath', \ help='Specify Tizen SDK installation root (one time init).' \ ' ex) /home/yours/tizen-sdk/') + build.add_argument('--c-opts', action='store', dest='c_opts', \ + help='Extra compile options USER_C_OPTS') + build.add_argument('--cpp-opts', action='store', dest='cpp_opts', \ + help='Extra compile options USER_CPP_OPTS') + build.add_argument('--link-opts', action='store', dest='link_opts', \ + help='Extra linking options USER_LINK_OPTS') return parser.parse_args(argv[1:]) @@ -612,6 +629,7 @@ def build_main(args): """Command [build] entry point.""" my_source = Source(src=args.workspace) + my_source.set_user_options(c_opts=args.c_opts, cpp_opts=args.cpp_opts, link_opts=args.link_opts) my_sdk = Sdk(sdkpath=args.sdkpath) my_sdk.clean(my_source) my_sdk.build_native(my_source, rootstrap=args.rootstrap, arch=args.arch, conf=args.conf, jobs=args.jobs)