Skip to content

Commit

Permalink
x264: Generate and install pdb files in debug-optimized configuration
Browse files Browse the repository at this point in the history
Avoid --enable-debug flag because it turns off compiler optimizations.
  • Loading branch information
AlessandroBono authored and nacho committed Aug 29, 2023
1 parent 04f160d commit 7c15227
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions gvsbuild/patches/x264/build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ if [ "$build_type" = "debug" ]; then
configure_cmd[idx++]="--extra-cflags=-MDd -Od -Zi"
fi

if [ "$build_type" = "debug-optimized" ]; then
configure_cmd[idx++]="--extra-ldflags=-DEBUG:FULL"
fi

CC=cl "${configure_cmd[@]}"

make
Expand Down
8 changes: 6 additions & 2 deletions gvsbuild/projects/x264.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ def __init__(self):
)

def build(self):
configuration = self.builder.opts.configuration
configuration = (
"debug-optimized"
if self.opts.release_configuration_is_actually_debug_optimized
else self.opts.configuration
)
msys_path = Project.get_tool_path("msys2")
self.exec_vs(
r"%s\bash build\build.sh %s %s"
Expand All @@ -53,7 +57,7 @@ def build(self):
working_dir=os.path.join(self.builder.gtk_dir, "lib"),
)

if configuration == "debug":
if configuration in ["debug-optimized", "debug"]:
self.install(r".\libx264-164.pdb bin")
self.install(r".\x264.pdb bin")

Expand Down

0 comments on commit 7c15227

Please sign in to comment.