Created
January 18, 2019 20:11
-
-
Save jix/4342dd522a7125a2803c6edeedd8735c to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python3 | |
import os | |
import sys | |
argv = sys.argv[1:] | |
try: | |
pkg_name = os.environ['CARGO_PKG_NAME'] | |
except KeyError: | |
pass | |
else: | |
if pkg_name == 'proptest': | |
try: | |
pos = list(zip(argv, argv[1:])).index(('-C', 'link-dead-code')) | |
except ValueError: | |
pass | |
else: | |
argv[pos:pos + 2] = [] | |
os.execv('/usr/bin/env', ['env', 'rustc'] + argv) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment