Commit graph

44 commits

Author SHA1 Message Date
Ryan Macnak 9575657668 AOT compiler changes for dart_content_handler:
- Move some misplaced entry points from the vm list to the standalone embedder list.
 - Add missing libdart_with_precompiler to GN.
 - Add ability to reference the root library in treeshaking roots without knowing its URI (as ::).

R=zra@google.com

Review-Url: https://codereview.chromium.org/2786483002 .
2017-03-29 10:12:05 -07:00
Ryan Macnak 9f2668c998 Set TARGET_OS_* from GN, falling back to HOST_OS_*.
Use TARGET_OS_* instead of HOST_OS_* to decide on the assembly variant to use. Allows, say, a gen_snapshot compiled for a Mac to target Android when generating AOT as assembly.

R=fschneider@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2757783003 .
2017-03-20 14:48:28 -07:00
Ben Konyi f679b3c3e5 Reintroducing MallocHooks changes with fix for hooks being called when in execvpe after a fork while the MallocHooks lock is held by a thread that may no longer exist.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2647283004 .
2017-01-30 09:55:20 -08:00
Martin Kustermann 4e34234c28 Add support for configurable -OX optimization levels for debug builds
Can be used via -dX or --debug-opt-level=X, e.g.

  tools/gn.py --mode=debug --arch=x64 -d0

R=vegorov@google.com, zra@google.com

Review-Url: https://codereview.chromium.org/2645323002 .
2017-01-24 17:36:37 +01:00
Zach Anderson 7730809f36 Revert "Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit."
This reverts commit 7bf5d87017.

The lock introduced by this change in MallocHooksState is held across
a fork(), which causes deadlock in the child when execvpe() fails and
tries to acquire the lock when freeing memory.

Review-Url: https://codereview.chromium.org/2647793005 .
2017-01-20 23:52:31 -08:00
Ben Konyi 7bf5d87017 Reintroducing MallocHooks changes with fix for infinite loop in MallocHooks on Platform::Exit.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2643303003 .
2017-01-20 15:26:58 -08:00
Ben Konyi c9a4374ed9 Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit 5290052550.

Revert "Fixed segfault in Remove method."

This reverts commit 203f1ba222.

BUG=
TBR=zra@google.com

Review-Url: https://codereview.chromium.org/2647763003 .
2017-01-19 15:17:29 -08:00
Ben Konyi 5290052550 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
Fixed build issues from original submission.

BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
Review-Url: https://codereview.chromium.org/2644903003 .
2017-01-19 13:15:56 -08:00
Ben Konyi 10686766cd Revert "Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project."
This reverts commit bcd7ba1056.

TBR=zra@google.com

BUG=

Review-Url: https://codereview.chromium.org/2645973002 .
2017-01-19 12:14:19 -08:00
Ben Konyi bcd7ba1056 Implemented basic heap memory allocation tracking in MallocHooks using hooks registered with tcmalloc. Also updated BUILD.gn files to account for include paths within the tcmalloc project.
BUG=
R=zra@google.com

Review-Url: https://codereview.chromium.org/2623613003 .
2017-01-19 12:09:07 -08:00
Florian Schneider bef4967ea1 Remove dart_noopt and related parts from the VM.
dart_noopt is not needed anymore because we have testing
and builbot integration of the real precompilation pipeline in place now.

Fixes #24569
Fixes #25726
Fixes #25845

R=rmacnak@google.com

Review-Url: https://codereview.chromium.org/2624393002 .
2017-01-11 16:55:55 -08:00
Ryan Macnak ccd6cc7fc5 Change GN debug builds to use -O2, which is the value used by GYP.
Running the language tests in debug mode, I got the following times
GYP -O2 1:50
GN -O1 4:48
GN -O2 1:55

R=zra@google.com

Review-Url: https://codereview.chromium.org/2614003003 .
2017-01-09 09:09:40 -08:00
Zachary Anderson 375322d3ab GN: Add option to build with TSAN
fixes #28216

R=asiva@google.com

Review-Url: https://codereview.chromium.org/2614493002 .
2017-01-03 14:37:27 -08:00
Zachary Anderson 566ed7ff55 GN: Fix armsimdbc target. Add armsimdbc64
R=johnmccutchan@google.com

Review-Url: https://codereview.chromium.org/2596333002 .
2016-12-22 10:24:24 -08:00
Zachary Anderson 8606013647 GN: Removes libdart_nosnapshot_precompiled_runtime
It doesn't make sense, and building its build is broken.

Review URL: https://codereview.chromium.org/2504343002 .
2016-11-16 08:57:17 -08:00
Zachary Anderson c1b08a0b97 GN: Try to fix Linux build on bots
Review URL: https://codereview.chromium.org/2449213003 .
2016-10-26 10:48:14 -07:00
Zachary Anderson c1313a5ec7 Format GN files and add a presubmit check that GN is properly formatted
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2451613005 .
2016-10-26 08:50:54 -07:00
Zachary Anderson 4ab6c33d9a Enable GN ASAN builds for Linux
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2392403002 .
2016-10-05 13:43:29 -07:00
Zach Anderson 9a6797e6ba GN build on windows
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2385643004 .
2016-10-04 09:19:07 -07:00
Zachary Anderson 7c784cea9f Linux create_sdk GN build for host
This CL enables GN builds of all targets from dart.gyp
on Linux for the host (i.e. ia32, x64).

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2379803002 .
2016-09-29 13:23:00 -07:00
Zachary Anderson 7e1b7e54d7 Starting work on full GN build
This change:
- Sucks in gn binaries
- Sucks in a version of llvm that the GN build likes
- Adds tools/gn.py to invoke gn
- Adds a root BUILD.gn and .gn file
- Removes chrome boilerplate we don't need
- etc.

This lets us do a standalone build of the 'runtime'
target for x64, ia32, arm, arm64, mips, and the
simulators on Linux, and arm and arm64 on Android.

It does not include tcmalloc, and hasn't been tested
on Mac or Windows. That work and more cleanup of
chrome boilerplate will come in follow-up CLs.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2350583002 .
2016-09-23 07:47:36 -07:00
Florian Schneider 9a68bad6fd During generation of the version.cc file, read the current Git hash.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/2206953004 .
2016-08-03 14:16:39 -07:00
Ryan Macnak 8fef08717f GN: Don't complain about dart_runtime_mode == "profile" + dart_debug (AOT with asserts).
R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/2168263002 .
2016-07-22 09:58:23 -07:00
Zachary Anderson e27b49fc80 [fuchsia] GN build support for Fuchsia OS and fuchsia_test target
This adds a GN target for the 'fuchsia_test' executable and teaches
the GN build about is_fuchsia. Key differences:

*) There's not currently a dart:io implementation for Fuchsia
*) Fuchsia's toolchain currently doesn't support (or need) ldl or lpthread
*) Fuchsia's buildconfig doesn't currently set the is_asan variable

Review URL: https://codereview.chromium.org/2149953003 .
2016-07-14 15:01:30 -07:00
Ryan Macnak 85cdc0eac2 Don't assume we want the iOS ABI if running simarm on Mac and the EABI otherwise.
Allow controlling the target ABI by defining TARGET_ABI_IOS or TARGET_ABI_EABI.  If neither is defined, default to the previous behavior.

Make Linux, Mac, Android and iOS agree on the value of PreferredCodeAlignment for all architectures.

BUG=http://dartbug.com/26464
R=zra@google.com

Review URL: https://codereview.chromium.org/1982613003 .
2016-05-17 15:03:54 -07:00
Chinmay Garde 269bcf9bf8 GN file updates to support using dbc.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1953173002 .
2016-05-05 17:08:03 -07:00
John McCutchan 0cfd4f5cd5 GN Build fixes for Flutter + gen_snapshot fix
1. Add "dart_runtime_mode" GN argument. This is an enum with three valid values: "release", "profile", and "develop".
   *) "release" builds product precompiled-runtime.
   *) "profile" builds non-product precompiled-runtime.
   *) "develop" builds non-product non-precompiled-runtime.

2. Remove the redundant "dart_product" GN argument.

3. Kill all *precompiled_runtime static library variants and the related config.

4. Always include the precompiler in gen_snapshot.

5. Support multiple --embedder_entry_points_manifest arguments to gen_snapshot.

6. Update our test harness to use gen_snapshot and pass the same kinds of command line arguments the Flutter folks are using.

7. ASSERT that both DART_PRECOMPILED_RUNTIME and DART_PRECOMPILER are not set at the same time.

R=fschneider@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1903583002 .
2016-04-22 07:00:03 -07:00
Zach Anderson a7295bbb2a Fixes DBC build for Mac
Also, adds an option to the GN build for DBC

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1910453003 .
2016-04-20 14:38:49 -07:00
Ryan Macnak d1c044c5a1 Enable DART_PRECOMPILER on all platforms so AOT compilation can be used on Android
BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1899953002 .
2016-04-18 17:03:11 -07:00
John McCutchan 7e498d2ba5 Add dart_product GN build argument
BUG=
R=iposva@google.com

Review URL: https://codereview.chromium.org/1885593002 .
2016-04-13 12:55:16 -07:00
Chinmay Garde a044cf9633 Avoid specifying DART_SHARED_LIB in the static library GN targets
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1781943002 .
2016-03-10 11:12:18 -08:00
Florian Schneider 289157044a Add libdart_precompiled_runtime target to runtime/BUILD.gn
This allows the embedder using the gn build files build a VM runtime without compiler-related code, used to run a precompiled snapshot.

It is a copy of libdart, but has the macro DART_PRECOMPILED_RUNTIME defined which excludes all
 compiler-related code, not needed to run precompiled code from the binary.

BUG=
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1738503002 .
2016-02-25 13:44:28 -08:00
Chinmay Garde 63e836ceae Fix the snapshotter to generate valid precompilation snapshots
R=asiva@google.com

Review URL: https://codereview.chromium.org/1673423004 .
2016-02-09 13:46:32 -08:00
Chinmay Garde 87ce99fd00 Enable generation of instruction buffer on precompilation
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1411383004 .
2015-10-22 12:26:41 -07:00
John McCutchan 2a9c5c0a91 Add public_config to :libdart in runtime/BUILD.gn
BUG=
R=jamesr@chromium.org

Review URL: https://codereview.chromium.org//1373613002 .
2015-09-25 12:41:03 -07:00
John McCutchan bcf6eb7099 Remove dart_debugger_api.h
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1190103003.
2015-06-17 14:56:55 -07:00
John McCutchan d7450e43fb Update GN build files for Mojo roll
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org//1142293007
2015-05-22 11:32:14 -07:00
iposva@google.com 320b0e5541 - Remove JSCRE from the runtime.
R=vegorov@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44987 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 23:59:23 +00:00
zra@google.com b1c08457f6 Allows gen_snapshot to be built with asan in the Mojo tree.
R=koda@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43764 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-13 15:37:03 +00:00
zra@google.com 9705799256 Adds dart_debug parameter to GN build.
R=johnmccutchan@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43602 260f80e4-7a28-3924-810f-c04153c831b5
2015-02-09 17:02:12 +00:00
ricow@google.com 77982f1fa9 Add support for ignoring the svn revision when getting the version, use this for gn build
R=zra@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43297 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-29 16:55:08 +00:00
zra@google.com fe36ebadab Disables printing a version string to the console for GN build.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@43041 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-21 15:18:23 +00:00
zra@google.com 9c352e0898 Moves BUILD.gn config from root to runtime.
Cannot checkout a single file from svn through gclient.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41677 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:59:00 +00:00
zra@google.com b4d3762221 Adds GN build files for building in GN based projects.
Review URL: https://codereview.chromium.org//690923003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41673 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-11 22:03:55 +00:00