Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2334)

Unified Diff: native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst

Issue 241753002: NaClSDK: Fix LINK+STRIP make rules to only apply to Release or PNaCl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update comment Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst
diff --git a/native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst b/native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst
index 91c93777003b42dad6602ffb30705f73f0be4fa5..36efa4fda9a05468277f8436ef97830ce124eee9 100644
--- a/native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst
+++ b/native_client_sdk/src/doc/devguide/tutorial/tutorial-part2.rst
@@ -69,7 +69,9 @@ Glibc NaCl) and two configurations (Debug, Release).
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
- ifeq ($(CONFIG),Release)
+ # The PNaCl workflow uses both an unstripped and finalized/stripped binary.
+ # On NaCl, only produce a stripped binary for Release configs (not Debug).
+ ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
@@ -182,7 +184,7 @@ will use the variables we've defined above.
$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
- ifeq ($(CONFIG),Release)
+ ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
@@ -206,11 +208,13 @@ example above, ``part2_arm.nexe``, ``part2_x86_32.nexe`` and
``part2_x86_64.nexe``.
When ``CONFIG`` is ``Release``, each executable is also stripped to remove
-debug information and reduce the file size:
+debug information and reduce the file size. Otherwise, when the ``TOOLCHAIN``
+is ``pnacl``, the workflow involves creating an unstripped binary for debugging
+and then finalizing it and stripping it for publishing.
.. naclcode::
- ifeq ($(CONFIG),Release)
+ ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else

Powered by Google App Engine
This is Rietveld 408576698