-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support cross compiling with prebuilt NASM (#528)
* Support cross compiling to x86_64-pc-windows-gnu * Update aws-lc-sys/builder/prebuilt-nasm.sh Co-authored-by: Sean McGrail <549813+skmcgrail@users.noreply.github.com> --------- Co-authored-by: Sean McGrail <549813+skmcgrail@users.noreply.github.com>
- Loading branch information
Showing
3 changed files
with
51 additions
and
1 deletion.
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
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,27 @@ | ||
#!/usr/bin/env bash | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 OR ISC | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
while [[ $# -gt 0 ]]; do | ||
case "$1" in | ||
-o) | ||
shift | ||
path="$1" | ||
filename="$(basename "$path")" | ||
filename="$(echo "$filename" | cut -f 1 -d '.')" | ||
cp "$SCRIPT_DIR/prebuilt-nasm/${filename}".obj "$path" | ||
exit 0 | ||
;; | ||
*) | ||
shift | ||
;; | ||
esac | ||
done | ||
|
||
# If we reach here, it means we didn't find the -o option | ||
echo "PATH: $path" >&2 | ||
echo "FILENAME: $filename" >&2 | ||
echo "SCRIPT_DIR: $SCRIPT_DIR" >&2 | ||
exit 1 |