args = parser.parse_args() if args.ls: import compilation print "Connecting to:", "%s:%s" % (args.host[0], args.host[1]) chans = compilation.remote_channels(args.host[0], args.host[1]) print "Remote compilation channels:", len(chans) for chan, strings in chans: print "\t%s" % chan print "\t\t%s" % strings exit() if args.ls_ql: import compilation print "Quick-link targets:", ", ".join(compilation.capabilities()) exit() if args.file and args.project: print "rtsc: cannot pass both --project and additional source files" exit() if args.v: os.environ["RTSC_VERBOSE"] = "1" # Determine the correct architecture if an arch "relative" to native is chosen. if args.v: print green + "Selected arch:" + normal, args.arch if args.arch in ("native", "32", "64"): real = determine_arch()
Converts Linux path separator convention to whatever is local. """ return os.path.join(*path.split("/")) print "Loading configuration file." # Load up the static configuration file. txt = [] for line in open(os.path.join("data", "extensions.json")): line = line.split("#")[0].strip() if not line: continue txt.append(line) global_config = json.loads("\n".join(txt)) # Load up the user-editable settings. try: path = os.path.join("data", "global_settings.json") fd = open(path) except: print path, "missing -- using defaults." global_config["settings"] = global_config["default_settings"].copy() else: global_config["settings"] = json.load(fd) fd.close() # Read in the sizes of various compilation targets. global_config["target_size"] = {} for target in compilation.capabilities(): global_config["target_size"][target] = compilation.get_size(target)
args = parser.parse_args() if args.ls: import compilation print "Connecting to:", "%s:%s" % (args.host[0], args.host[1]) chans = compilation.remote_channels(args.host[0], args.host[1]) print "Remote compilation channels:", len(chans) for chan, strings in chans: print "\t%s" % chan print "\t\t%s" % strings exit() if args.ls_ql: import compilation print "Quick-link targets:", ", ".join(compilation.capabilities()) exit() if args.file and args.project: print "rtsc: cannot pass both --project and additional source files" exit() if args.v: os.environ["RTSC_VERBOSE"] = "1" # Determine the correct architecture if an arch "relative" to native is chosen. if args.v: print green+"Selected arch:"+normal, args.arch if args.arch in ("native", "32", "64"): real = determine_arch()