moved crates in lib/ to src/, renamed crates, modified some files' text (#660)

moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
This commit is contained in:
lazypassion
2019-01-28 18:56:54 -05:00
committed by Dan Gohman
parent 54959cf5bb
commit 747ad3c4c5
508 changed files with 94 additions and 92 deletions

View File

@@ -0,0 +1,32 @@
"""
Generate build dependencies for Cargo.
The `build.py` script is invoked by cargo when building cranelift-codegen to
generate Rust code from the instruction descriptions. Cargo needs to know when
it is necessary to rerun the build script.
If the build script outputs lines of the form:
cargo:rerun-if-changed=/path/to/file
cargo will rerun the build script when those files have changed since the last
build.
"""
from __future__ import absolute_import, print_function
import os
from os.path import dirname, abspath, join
try:
from typing import Iterable # noqa
except ImportError:
pass
def generate():
# type: () -> None
print("Dependencies from meta language directory:")
meta = dirname(abspath(__file__))
for (dirpath, _, filenames) in os.walk(meta):
for f in filenames:
if f.endswith('.py'):
print("cargo:rerun-if-changed=" + join(dirpath, f))