From 419d1599ccbd1c911b1ee665abd1447b4f97b0a7 Mon Sep 17 00:00:00 2001 From: Josh Watzman Date: Fri, 19 Jun 2015 09:49:26 -0700 Subject: [PATCH] [hack] Include debug symbols in OSS build Summary: Maybe this is why OCAMLRUNPARAM=b doesn't seem to do anything when we get external bug reports? Reviewed By: @int3 Differential Revision: D2170316 --- hack/Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hack/Makefile b/hack/Makefile index 2e095acc56c..9b7ee675fe0 100644 --- a/hack/Makefile +++ b/hack/Makefile @@ -1,6 +1,3 @@ -# Copyright (c) 2014, Facebook, Inc. -# All rights reserved. - ################################################################################ # Variables to override # ################################################################################ @@ -121,8 +118,8 @@ $(TARGETS): $(ALL_SRC_FILES) # build-hack-native-deps is a dependency of $(TARGETS) but as it is phony # we place it here to avoid unnecessary rebuilds $(MAKE) build-hack-native-deps build-hhi-archive - ocamlbuild -no-links $(INCLUDE_OPTS) $(LIB_OPTS) \ - -lflags "$(LINKER_FLAGS)" \ + ocamlbuild -no-links -cflag -g $(INCLUDE_OPTS) $(LIB_OPTS) \ + -lflags "-g $(LINKER_FLAGS)" \ $(patsubst _build/%,%,$(TARGETS)) # Touching the targets is necessary because the ocaml build # doesn't change the modification dates of the targets if @@ -130,7 +127,7 @@ $(TARGETS): $(ALL_SRC_FILES) touch $(TARGETS) build-hack-native-deps: build-hack-stubs - ocamlbuild -cflags "$(EXTRA_INCLUDE_OPTS) $(EXTRA_CC_OPTS)" $(NATIVE_OBJECT_FILES) + ocamlbuild -cflags "-g $(EXTRA_INCLUDE_OPTS) $(EXTRA_CC_OPTS)" $(NATIVE_OBJECT_FILES) build-hack-stubs: REV="const char* const BuildInfo_kRevision = \"$$(git rev-parse HEAD)\";"; \