-
-
Notifications
You must be signed in to change notification settings - Fork 610
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue 17167 - handle long filepaths on Windows
- Loading branch information
1 parent
34ff1bc
commit 34f6ded
Showing
3 changed files
with
215 additions
and
28 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
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,24 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| # Test that file paths larger than 248 characters can be used | ||
| # Test CRLF and mixed line ending handling in D lexer. | ||
|
|
||
| name=$(basename "$0" .sh) | ||
| dir=${RESULTS_DIR}/compilable/ | ||
|
|
||
| test_dir=${dir}/${name}/uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu | ||
| [[ -d $test_dir ]] || mkdir -p "$test_dir" | ||
| bin_base=${test_dir}/${name} | ||
| bin="$bin_base$OBJ" | ||
| src="$bin_base.d" | ||
|
|
||
| echo 'void main() {}' > "${src}" | ||
|
|
||
| # Only compile, not link, since optlink can't handle long file names | ||
| $DMD -m"${MODEL}" "${DFLAGS}" -c -of"${bin}" "${src}" || exit 1 | ||
|
|
||
| rm -rf "${dir:?}"/"$name" | ||
|
|
||
| echo Success >"${dir}"/"$(basename $0)".out |