def compileflags(self, what): from mozbuild.util import resolve_target_to_make from mozbuild.compilation import util if not util.check_top_objdir(self.topobjdir): return 1 path_arg = self._wrap_path_argument(what) make_dir, make_target = resolve_target_to_make(self.topobjdir, path_arg.relpath()) if make_dir is None and make_target is None: return 1 build_vars = util.get_build_vars(make_dir, self) if what.endswith('.c'): name = 'COMPILE_CFLAGS' else: name = 'COMPILE_CXXFLAGS' if name not in build_vars: return print(' '.join(shell_quote(arg) for arg in shell_split(build_vars[name])))
def compileflags(self, what): from mozbuild.util import resolve_target_to_make from mozbuild.compilation import util if not util.check_top_objdir(self.topobjdir): return 1 path_arg = self._wrap_path_argument(what) make_dir, make_target = resolve_target_to_make(self.topobjdir, path_arg.relpath()) if make_dir is None and make_target is None: return 1 build_vars = util.get_build_vars(make_dir, self) if what.endswith('.c'): cc = 'CC' name = 'COMPILE_CFLAGS' else: cc = 'CXX' name = 'COMPILE_CXXFLAGS' if name not in build_vars: return # Drop the first flag since that is the pathname of the compiler. flags = (shell_split(build_vars[cc]) + shell_split(build_vars[name]))[1:] print(' '.join(shell_quote(arg) for arg in util.sanitize_cflags(flags)))
def compileflags(self, what): from mozbuild.util import resolve_target_to_make from mozbuild.compilation import util if not util.check_top_objdir(self.topobjdir): return 1 path_arg = self._wrap_path_argument(what) make_dir, make_target = resolve_target_to_make(self.topobjdir, path_arg.relpath()) if make_dir is None and make_target is None: return 1 build_vars = util.get_build_vars(make_dir, self) if what.endswith(".c"): cc = "CC" name = "COMPILE_CFLAGS" else: cc = "CXX" name = "COMPILE_CXXFLAGS" if name not in build_vars: return # Drop the first flag since that is the pathname of the compiler. flags = (shell_split(build_vars[cc]) + shell_split(build_vars[name]))[1:] print(" ".join(shell_quote(arg) for arg in util.sanitize_cflags(flags)))
def compileflags(self, what): from mozbuild.util import resolve_target_to_make from mozbuild.compilation import util if not util.check_top_objdir(self.topobjdir): return 1 path_arg = self._wrap_path_argument(what) make_dir, make_target = resolve_target_to_make(self.topobjdir, path_arg.relpath()) if make_dir is None and make_target is None: return 1 build_vars = util.get_build_vars(make_dir, self) if what.endswith('.c'): name = 'COMPILE_CFLAGS' else: name = 'COMPILE_CXXFLAGS' if name not in build_vars: return print(' '.join(shell_quote(arg) for arg in util.get_flags(self.topobjdir, make_dir, build_vars, name)))
def compileflags(command_context, what): from mozbuild.util import resolve_target_to_make from mozbuild.compilation import util if not util.check_top_objdir(command_context.topobjdir): return 1 path_arg = command_context._wrap_path_argument(what) make_dir, make_target = resolve_target_to_make(command_context.topobjdir, path_arg.relpath()) if make_dir is None and make_target is None: return 1 build_vars = util.get_build_vars(make_dir, command_context) if what.endswith(".c"): cc = "CC" name = "COMPILE_CFLAGS" else: cc = "CXX" name = "COMPILE_CXXFLAGS" if name not in build_vars: return # Drop the first flag since that is the pathname of the compiler. flags = (shell_split(build_vars[cc]) + shell_split(build_vars[name]))[1:] print(" ".join(shell_quote(arg) for arg in util.sanitize_cflags(flags)))
def _init(self): CommonBackend._init(self) if not util.check_top_objdir(self.environment.topobjdir): raise Exception() # The database we're going to dump out to. self._db = [] # The cache for per-directory flags self._flags = {} log_manager = LoggingManager() self._cmd = MozbuildObject(self.environment.topsrcdir, ConfigSettings(), log_manager, self.environment.topobjdir)
def _init(self): CommonBackend._init(self) if not util.check_top_objdir(self.environment.topobjdir): raise Exception() # The database we're going to dump out to. self._db = OrderedDict() # The cache for per-directory flags self._flags = {} self._envs = {} self._local_flags = defaultdict(dict) self._per_source_flags = defaultdict(list)
def _init(self): CommonBackend._init(self) if not util.check_top_objdir(self.environment.topobjdir): raise Exception() # The database we're going to dump out to. self._db = OrderedDict() # The cache for per-directory flags self._flags = {} self._envs = {} self._includes = defaultdict(list) self._defines = defaultdict(list) self._local_flags = defaultdict(dict) self._extra_includes = defaultdict(list) self._gyp_dirs = set() self._dist_include_testing = '-I%s' % mozpath.join( self.environment.topobjdir, 'dist', 'include', 'testing')