-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Servo project and its build environment
- Loading branch information
Showing
9 changed files
with
115 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from logger import logger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import os | ||
import inspect | ||
import logging | ||
|
||
""" | ||
CSiBE logging facality | ||
If CSiBE_DEBUG_FILE environmental variable is set all CRITICAL and ERROR | ||
messages will be sent to the required file. Otherwise the messages will be sent | ||
to stdout and stderr. | ||
If CSiBE_DEBUG environmental variable is set to 1 all DEBUG, INFO, WARNING, | ||
ERROR, and CRITICAL messages will be displayed. | ||
Sample usage: | ||
from csibe import logger | ||
logger.error(error_text) | ||
logger.debug(debug_text) | ||
""" | ||
|
||
if os.getenv("CSiBE_DEBUG_FILE", ""): | ||
__args = {"filename": os.environ["CSiBE_DEBUG_FILE"], "level": logging.ERROR} | ||
else: | ||
__args = {"level": logging.CRITICAL} | ||
__frame = inspect.stack()[2] | ||
__module = inspect.getmodule(__frame[0]) | ||
logging.basicConfig(**__args) | ||
|
||
"""The main logger facality for CSiBE""" | ||
logger = logging.getLogger(__module.__file__) | ||
|
||
if os.getenv("CSiBE_DEBUG", "") == "1": | ||
logger.setLevel(logging.DEBUG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/python | ||
|
||
import sys | ||
import subprocess | ||
import os | ||
|
||
if __name__ == "__main__": | ||
pbdir = os.environ["PROJECT_BINARY_DIR"] | ||
psdir = os.environ["PROJECT_SOURCE_DIR"] | ||
pgdir = os.environ["PROJECT_GEN_DIR"] | ||
|
||
if not pbdir or not psdir or not pgdir: | ||
sys.exit(1) | ||
|
||
# For build directories | ||
if "SERVO_CACHE_DIR" not in os.environ: | ||
os.environ["SERVO_CACHE_DIR"] = os.path.join(pbdir, ".servo") | ||
|
||
if "CARGO_HOME" not in os.environ: | ||
os.environ["CARGO_HOME"] = os.path.join(pbdir, ".cargo") | ||
|
||
if "CARGO_TARGET_DIR" not in os.environ: | ||
os.environ["CARGO_TARGET_DIR"] = os.path.join(pbdir, "target") | ||
|
||
# Use wrappers for compilers (native) | ||
if "CC" not in os.environ: | ||
os.environ["CC"] = "gcc" | ||
|
||
if "CXX" not in os.environ: | ||
os.environ["CXX"] = "c++" | ||
|
||
if os.getenv("CSiBE_DEBUG", "") == "1": | ||
mach_debug = ["-v"] | ||
else: | ||
mach_debug = [] | ||
|
||
subprocess.call([os.path.join(psdir, "mach"), "bootstrap-rust"]) | ||
subprocess.call([os.path.join(pgdir, "setup-csibe.py"), os.path.join(pbdir, ".servo")]) | ||
subprocess.call([os.path.join(psdir, "mach"), "bootstrap-cargo"]) | ||
subprocess.call([os.path.join(psdir, "mach"), "build", "-r"] + mach_debug) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule servo
updated
8839 files