-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Avoid hardcoding paths in Profile and Sys #59998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Current code fails when using custom paths. Save directory where Julia source is stored during build in `SOURCEDIR` instead of assuming it can be computed from `BINDIR` (new name chosen to avoid confusing with `build_dir` which is different). Use `DATAROOTDIR` and `DATAROOT` instead of hardcoding `usr/share/` and `share/`. Fix/continuation of #56601, #56627.
base/Makefile
Outdated
| @printf "%s\n" "const PRIVATE_LIBDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libdir_rel)))) >> $@ | ||
| @printf "%s\n" "const PRIVATE_LIBEXECDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(private_libexecdir_rel)))) >> $@ | ||
| @printf "%s\n" "const INCLUDEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(includedir_rel)))) >> $@ | ||
| @printf "%s\n" "const SOURCEDIR = "$(call shell_escape,$(call julia_escape,$(call normalize_path,$(JULIAHOME)))) >> $@ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAICT this new constant is needed as paths to source files are those at build time. BUILD_ROOT_PATH which was defined below was incorrect in claiming that it pointed to the build-time source path as it was based on BINDIR, yet there's no guarantee that the julia executable during build time is next to the source dir.
Failure for `@juliasrc`: SOURCEDIR was "/c/workdir" (giving "\\c\\workdir") on Windows builder, while "C:\\workdir" was expected. Failure for `@Compiler`: missing ending slash meant that remainder was an absolute path. Minor cleanups.
|
CI failure on test x86_64-linux-gnuassertrr seems unrelated. |
Current code fails when using custom paths. Save directory where Julia source is stored during build in
SOURCEDIRinstead of assuming it can be computed fromBINDIR(new name chosen to avoid confusing withbuild_dirwhich is different). UseDATAROOTDIRandDATAROOTinstead of hardcodingusr/share/andshare/.Fix/continuation of #56601, #56627.