-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(julia): custom build without Frame Pointer Omission
- Loading branch information
Showing
4 changed files
with
53 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
.PHONY: build | ||
build: | ||
docker build -t parca-demo:julia . | ||
|
||
build-patched: | ||
docker run --interactive --rm --volume="${PWD}:/build" --workdir=/build \ | ||
docker.io/nixos/nix:2.11.1 sh -c '$$(nix-build --no-out-link)' | docker load |
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,28 @@ | ||
{ pkgs ? import | ||
(builtins.fetchTarball | ||
"https://github.com/NixOS/nixpkgs/archive/nixos-22.11.tar.gz" | ||
) | ||
{ } | ||
}: | ||
|
||
let | ||
julia = pkgs.julia.overrideAttrs (current: { | ||
patches = current.patches ++ [ | ||
./patches/0001-disable-frame-pointer-omission.patch | ||
]; | ||
doInstallCheck = false; | ||
}); | ||
in | ||
pkgs.dockerTools.streamLayeredImage { | ||
name = "parca-demo"; | ||
tag = "julia"; | ||
contents = [ | ||
julia | ||
(pkgs.writeTextDir "app/main.jl" (builtins.readFile ./main.jl)) | ||
]; | ||
config = { | ||
Cmd = [ "julia" "main.jl" ]; | ||
Env = [ "ENABLE_JITPROFILING=1" ]; | ||
WorkingDir = "/app"; | ||
}; | ||
} |
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,20 @@ | ||
commit 1d5a4168933d19df4784aa6c73a5a7653610cf04 | ||
Author: Maxime Brunet <[email protected]> | ||
Date: Sat Feb 11 11:37:06 2023 -0800 | ||
|
||
Disable Frame Pointer Omission on Linux | ||
|
||
diff --git a/src/codegen.cpp b/src/codegen.cpp | ||
index 104f77f8d6..5a1284be6d 100644 | ||
--- a/src/codegen.cpp | ||
+++ b/src/codegen.cpp | ||
@@ -10,7 +10,7 @@ | ||
#if defined(_CPU_X86_) | ||
#define JL_NEED_FLOATTEMP_VAR 1 | ||
#endif | ||
-#if defined(_OS_WINDOWS_) || defined(_OS_FREEBSD_) | ||
+#if defined(_OS_WINDOWS_) || defined(_OS_LINUX_) || defined(_OS_FREEBSD_) | ||
#define JL_DISABLE_FPO | ||
#endif | ||
|
||
|