# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/.
import os
def check_top_objdir(topobjdir):
top_make = os.path.join(topobjdir, "Makefile") ifnot os.path.exists(top_make):
print( "Your tree has not been built yet. Please run " "|mach build| with no arguments."
) returnFalse returnTrue
def sanitize_cflags(flags): # We filter out -Xclang arguments as clang based tools typically choke on # passing these flags down to the clang driver. -Xclang tells the clang # driver driver to pass whatever comes after it down to clang cc1, which is # why we skip -Xclang and the argument immediately after it. Here is an # example: the following two invocations pass |-foo -bar -baz| to cc1: # clang -cc1 -foo -bar -baz # clang -Xclang -foo -Xclang -bar -Xclang -baz
sanitized = []
saw_xclang = False for flag in flags: if flag == "-Xclang":
saw_xclang = True elif saw_xclang:
saw_xclang = False else:
sanitized.append(flag) return sanitized
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.