Enable tcmalloc VDSO support only on x86 to reduce static initializers

Background context
------------------
crrev.com/1466173002 switched the GN tcmalloc target from
source_set -> static_library. There are good reasons for keeping
tcmalloc a source_set (see "Note on static libraries" in [1]). However,
in the current state source_set was exposing extra static initializers
in the GN build which, are not present in the gyp build due to the
linker gc sections.

Resolution of this CL
---------------------
The fact that vdso_support.cc is GC-ed by the linker is the symptom
that such code is unreachable. A search in the codebase shows that the
only client is stacktrace_x86-inl.h, which depends on VDSO only when
defined(__linux__) && defined(__i386__)
This CL is therefore matching this condition in vdso_support.h and
conditioning the #define HAVE_VDSO_SUPPORT with the same conditions.

Final result after this CL
--------------------------
On GYP, the chrome binary is bit-identical before and after this CL:
$ md5sum out_gyp/Release/chrome{,.tot}
0e9205350b9604eb7fc16988e39a7a86  out_gyp/Release/chrome
0e9205350b9604eb7fc16988e39a7a86  out_gyp/Release/chrome.tot

This CL does not regress GN static initializers (w.r.t. gyp) either:

$ tools/linux/dump-static-initializers.py out_gn/chrome
... (verbose output omitted) ...
Found 38 static initializers in 7 files.

$ tools/linux/dump-static-initializers.py out_gyp/Release/chrome
... (verbose output omitted) ...
Found 38 static initializers in 7 files.

[1] https://chromium.googlesource.com/chromium/src/+/master/tools/gn/docs/cookbook.md

BUG=559766,564618

Review URL: https://codereview.chromium.org/1578163002

Cr-Original-Commit-Position: refs/heads/master@{#368940}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a51d32cb536525bc8f6ca372da94bc719eed55f7
1 file changed
tree: 54410f9dc9a1062580efb30f0035fd9d1d403660
  1. src/