From a7f97a27eb21b10ab3f1191b8e210707a8d9675d Mon Sep 17 00:00:00 2001 From: Frank Henigman Date: Tue, 21 Aug 2018 00:04:05 -0400 Subject: [PATCH] Gyp is dead. Long live gn. Remove the gyp build. The .gypi files were not renamed so that diff and rebase would work on this change. They will be renamed in a separate change. BUG=angleproject:1569 Change-Id: If8a217027633293664b820104f91a4ca5889b24e Reviewed-on: https://chromium-review.googlesource.com/1187380 Commit-Queue: Frank Henigman Reviewed-by: Jamie Madill Reviewed-by: Yuly Novikov --- .gitignore | 2 - .gn | 4 +- BUILD.gn | 139 +- DEPS | 12 - README.md | 2 +- doc/BuildingAngleForWindowsStore.md | 58 - doc/ContributingCode.md | 4 +- doc/DebuggingTips.md | 6 +- doc/DevSetup.md | 2 +- doc/gyp.md | 31 - dotfile_settings.gni | 1 - gyp/ANGLE.gyp | 29 - gyp/common.gypi | 458 ---- gyp/common_defines.gypi | 158 -- gyp/gyp_angle | 83 - gyp/standalone.gypi | 42 - gyp/touch_stamp.py | 16 - gyp/warnings.gyp | 30 - samples/samples.gyp | 240 -- scripts/generate_new_renderer.py | 2 +- scripts/update_canary_angle.py | 4 - src/angle.gyp | 486 ---- src/compiler.gypi | 713 +++--- src/libEGL.gypi | 91 - src/libGLESv2.gypi | 2336 ++++++++----------- src/tests/BUILD.gn | 148 +- src/tests/angle_end2end_tests.gypi | 373 ++- src/tests/angle_perftests.gypi | 148 +- src/tests/angle_unittests.gypi | 317 ++- src/tests/angle_white_box_tests.gypi | 79 +- src/tests/deqp.gypi | 3124 ++++++++++---------------- src/tests/tests.gyp | 369 --- util/util.gyp | 334 +-- 33 files changed, 2955 insertions(+), 6886 deletions(-) delete mode 100644 doc/BuildingAngleForWindowsStore.md delete mode 100644 doc/gyp.md delete mode 100644 gyp/ANGLE.gyp delete mode 100644 gyp/common.gypi delete mode 100644 gyp/common_defines.gypi delete mode 100755 gyp/gyp_angle delete mode 100644 gyp/standalone.gypi delete mode 100644 gyp/touch_stamp.py delete mode 100644 gyp/warnings.gyp delete mode 100644 samples/samples.gyp delete mode 100644 src/angle.gyp delete mode 100644 src/libEGL.gypi delete mode 100644 src/tests/tests.gyp diff --git a/.gitignore b/.gitignore index 7f9ea74e2..992e12651 100644 --- a/.gitignore +++ b/.gitignore @@ -30,7 +30,6 @@ /third_party/gles1_conform /third_party/glslang/src /third_party/googletest/src -/third_party/gyp /third_party/libpng/src /third_party/llvm-build /third_party/spirv-headers/src @@ -60,4 +59,3 @@ Release_Win32/ Release_x64/ TestResults.qpa tools/clang -tools/gyp diff --git a/.gn b/.gn index e9a6c6698..a34187cab 100644 --- a/.gn +++ b/.gn @@ -28,12 +28,12 @@ check_targets = [] # to force additional review for new uses of exec_script, which is strongly # discouraged except for gypi_to_gn calls. exec_script_whitelist = angle_dotfile_settings.exec_script_whitelist + - build_dotfile_settings.exec_script_whitelist + [ + build_dotfile_settings.exec_script_whitelist + + [ "//build/config/sysroot.gni", "//build/config/win/BUILD.gn", "//build/config/win/visual_studio_version.gni", "//build/gn_helpers.py", - "//build/gypi_to_gn.py", ] default_args = { diff --git a/BUILD.gn b/BUILD.gn index 4e63c9741..6f8fca69b 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -49,15 +49,8 @@ angle_git_is_present = exec_script("src/commit_id.py", angle_use_commit_id = angle_git_is_present == 1 -gles_gypi = exec_script("//build/gypi_to_gn.py", - [ rebase_path("src/libGLESv2.gypi") ], - "scope", - [ "src/libGLESv2.gypi" ]) - -compiler_gypi = exec_script("//build/gypi_to_gn.py", - [ rebase_path("src/compiler.gypi") ], - "scope", - [ "src/compiler.gypi" ]) +import("src/libGLESv2.gypi") +import("src/compiler.gypi") # This config is exported to dependent targets (and also applied to internal # ones). @@ -132,11 +125,11 @@ angle_undefine_configs = [ "//build/config/compiler:default_include_dirs" ] # Holds the shared includes so we only need to list them once. source_set("includes") { - sources = rebase_path(gles_gypi.libangle_includes, ".", "src") + sources = rebase_path(libangle_includes, ".", "src") } static_library("preprocessor") { - sources = rebase_path(compiler_gypi.angle_preprocessor_sources, ".", "src") + sources = rebase_path(angle_preprocessor_sources, ".", "src") configs -= angle_undefine_configs configs += [ @@ -173,18 +166,18 @@ config("angle_common_config") { } static_library("angle_common") { - sources = rebase_path(gles_gypi.libangle_common_sources, ".", "src") + sources = rebase_path(libangle_common_sources, ".", "src") if (is_linux || is_android || is_fuchsia) { - sources += rebase_path(gles_gypi.libangle_common_linux_sources, ".", "src") + sources += rebase_path(libangle_common_linux_sources, ".", "src") } if (is_mac) { - sources += rebase_path(gles_gypi.libangle_common_mac_sources, ".", "src") + sources += rebase_path(libangle_common_mac_sources, ".", "src") } if (is_win) { - sources += rebase_path(gles_gypi.libangle_common_win_sources, ".", "src") + sources += rebase_path(libangle_common_win_sources, ".", "src") } configs -= angle_undefine_configs @@ -211,7 +204,7 @@ config("angle_image_util_config") { } static_library("angle_image_util") { - sources = rebase_path(gles_gypi.libangle_image_util_sources, ".", "src") + sources = rebase_path(libangle_image_util_sources, ".", "src") configs -= angle_undefine_configs configs += [ @@ -246,7 +239,7 @@ static_library("angle_gpu_info_util") { ":angle_common", ] - sources = rebase_path(gles_gypi.libangle_gpu_info_util_sources, ".", "src") + sources = rebase_path(libangle_gpu_info_util_sources, ".", "src") deps = [] libs = [] defines = [] @@ -256,19 +249,16 @@ static_library("angle_gpu_info_util") { } if (is_win) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_win_sources, ".", "src") + sources += rebase_path(libangle_gpu_info_util_win_sources, ".", "src") libs += [ "setupapi.lib" ] defines += [ "GPU_INFO_USE_SETUPAPI" ] } if (is_linux) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_linux_sources, ".", "src") + sources += rebase_path(libangle_gpu_info_util_linux_sources, ".", "src") if (use_x11) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_x11_sources, ".", "src") + sources += rebase_path(libangle_gpu_info_util_x11_sources, ".", "src") deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] defines += [ "GPU_INFO_USE_X11" ] libs += [ @@ -280,15 +270,13 @@ static_library("angle_gpu_info_util") { } if (use_libpci) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_libpci_sources, ".", "src") + sources += rebase_path(libangle_gpu_info_util_libpci_sources, ".", "src") defines += [ "GPU_INFO_USE_LIBPCI" ] libs += [ "pci" ] } if (is_mac) { - sources += - rebase_path(gles_gypi.libangle_gpu_info_util_mac_sources, ".", "src") + sources += rebase_path(libangle_gpu_info_util_mac_sources, ".", "src") libs += [ "IOKit.framework", "CoreFoundation.framework", @@ -298,31 +286,26 @@ static_library("angle_gpu_info_util") { } static_library("translator") { - sources = rebase_path(compiler_gypi.angle_translator_sources, ".", "src") + sources = rebase_path(angle_translator_sources, ".", "src") defines = [] if (angle_enable_essl || use_fuzzing_engine) { - sources += - rebase_path(compiler_gypi.angle_translator_essl_sources, ".", "src") + sources += rebase_path(angle_translator_essl_sources, ".", "src") defines += [ "ANGLE_ENABLE_ESSL" ] } if (angle_enable_glsl || use_fuzzing_engine) { - sources += - rebase_path(compiler_gypi.angle_translator_glsl_sources, ".", "src") + sources += rebase_path(angle_translator_glsl_sources, ".", "src") defines += [ "ANGLE_ENABLE_GLSL" ] } if (angle_enable_hlsl || use_fuzzing_engine) { - sources += - rebase_path(compiler_gypi.angle_translator_hlsl_sources, ".", "src") + sources += rebase_path(angle_translator_hlsl_sources, ".", "src") defines += [ "ANGLE_ENABLE_HLSL" ] } if (angle_enable_vulkan || use_fuzzing_engine) { - sources += rebase_path(compiler_gypi.angle_translator_lib_vulkan_sources, - ".", - "src") + sources += rebase_path(angle_translator_lib_vulkan_sources, ".", "src") defines += [ "ANGLE_ENABLE_VULKAN" ] } @@ -380,7 +363,9 @@ if (angle_use_commit_id) { ] # commit id should depend on angle's HEAD revision - inputs = [ ".git/HEAD" ] + inputs = [ + ".git/HEAD", + ] args = [ "gen", @@ -464,7 +449,7 @@ if (angle_enable_vulkan) { } static_library("libANGLE") { - sources = rebase_path(gles_gypi.libangle_sources, ".", "src") + sources = rebase_path(libangle_sources, ".", "src") include_dirs = [] libs = [] @@ -486,34 +471,34 @@ static_library("libANGLE") { # Shared D3D sources. if (angle_enable_d3d9 || angle_enable_d3d11) { - sources += rebase_path(gles_gypi.libangle_d3d_shared_sources, ".", "src") + sources += rebase_path(libangle_d3d_shared_sources, ".", "src") defines += [ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " + "\"d3dcompiler_47.dll\", \"d3dcompiler_46.dll\", \"d3dcompiler_43.dll\" }" ] } if (angle_enable_d3d9) { - sources += rebase_path(gles_gypi.libangle_d3d9_sources, ".", "src") + sources += rebase_path(libangle_d3d9_sources, ".", "src") libs += [ "d3d9.lib" ] } if (angle_enable_d3d11) { - sources += rebase_path(gles_gypi.libangle_d3d11_sources, ".", "src") - sources += rebase_path(gles_gypi.libangle_d3d11_win32_sources, ".", "src") + sources += rebase_path(libangle_d3d11_sources, ".", "src") + sources += rebase_path(libangle_d3d11_win32_sources, ".", "src") libs += [ "dxguid.lib" ] } if (angle_enable_gl) { - sources += rebase_path(gles_gypi.libangle_gl_sources, ".", "src") + sources += rebase_path(libangle_gl_sources, ".", "src") include_dirs += [ "src/third_party/khronos" ] if (angle_enable_gl_null) { - sources += rebase_path(gles_gypi.libangle_gl_null_sources, ".", "src") + sources += rebase_path(libangle_gl_null_sources, ".", "src") } if (is_win) { - sources += rebase_path(gles_gypi.libangle_gl_wgl_sources, ".", "src") + sources += rebase_path(libangle_gl_wgl_sources, ".", "src") } if (use_x11) { - sources += rebase_path(gles_gypi.libangle_gl_glx_sources, ".", "src") + sources += rebase_path(libangle_gl_glx_sources, ".", "src") deps += [ "src/third_party/libXNVCtrl:libXNVCtrl" ] libs += [ "X11", @@ -522,7 +507,7 @@ static_library("libANGLE") { ] } if (is_mac) { - sources += rebase_path(gles_gypi.libangle_gl_cgl_sources, ".", "src") + sources += rebase_path(libangle_gl_cgl_sources, ".", "src") libs += [ "Cocoa.framework", "IOSurface.framework", @@ -531,10 +516,9 @@ static_library("libANGLE") { ] } if (is_android) { - sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src") - sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src") - sources += - rebase_path(gles_gypi.libangle_gl_egl_android_sources, ".", "src") + sources += rebase_path(libangle_gl_egl_sources, ".", "src") + sources += rebase_path(libangle_gl_egl_dl_sources, ".", "src") + sources += rebase_path(libangle_gl_egl_android_sources, ".", "src") if (ndk_supports_nativewindow) { libs += [ "nativewindow" ] } else { @@ -546,24 +530,22 @@ static_library("libANGLE") { configs += [ ":libdrm" ] defines += [ "ANGLE_USE_OZONE" ] deps += [ "//third_party/minigbm" ] - sources += rebase_path(gles_gypi.libangle_gl_egl_sources, ".", "src") - sources += rebase_path(gles_gypi.libangle_gl_egl_dl_sources, ".", "src") - sources += rebase_path(gles_gypi.libangle_gl_ozone_sources, ".", "src") + sources += rebase_path(libangle_gl_egl_sources, ".", "src") + sources += rebase_path(libangle_gl_egl_dl_sources, ".", "src") + sources += rebase_path(libangle_gl_ozone_sources, ".", "src") } } if (angle_enable_vulkan) { - sources += rebase_path(gles_gypi.libangle_vulkan_sources, ".", "src") + sources += rebase_path(libangle_vulkan_sources, ".", "src") if (is_win) { - sources += - rebase_path(gles_gypi.libangle_vulkan_win32_sources, ".", "src") + sources += rebase_path(libangle_vulkan_win32_sources, ".", "src") } if (is_linux) { - sources += rebase_path(gles_gypi.libangle_vulkan_xcb_sources, ".", "src") + sources += rebase_path(libangle_vulkan_xcb_sources, ".", "src") } if (is_android) { - sources += - rebase_path(gles_gypi.libangle_vulkan_android_sources, ".", "src") + sources += rebase_path(libangle_vulkan_android_sources, ".", "src") } deps += [ ":angle_vulkan" ] public_deps += [ "$angle_root/third_party/vulkan-headers:vulkan_headers" ] @@ -574,7 +556,7 @@ static_library("libANGLE") { } if (angle_enable_null) { - sources += rebase_path(gles_gypi.libangle_null_sources, ".", "src") + sources += rebase_path(libangle_null_sources, ".", "src") } if (is_debug) { @@ -621,7 +603,7 @@ config("angle_static") { } shared_library("libGLESv2${angle_libs_suffix}") { - sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src") + sources = rebase_path(libglesv2_sources, ".", "src") if (is_android) { configs -= [ "//build/config/android:hide_all_but_jni_onload" ] @@ -669,7 +651,7 @@ shared_library("libGLESv2${angle_libs_suffix}") { } static_library("libGLESv2_static") { - sources = rebase_path(gles_gypi.libglesv2_sources, ".", "src") + sources = rebase_path(libglesv2_sources, ".", "src") configs -= angle_undefine_configs configs += [ @@ -688,7 +670,7 @@ static_library("libGLESv2_static") { } shared_library("libGLESv1_CM${angle_libs_suffix}") { - sources = rebase_path(gles_gypi.libglesv1_cm_sources, ".", "src") + sources = rebase_path(libglesv1_cm_sources, ".", "src") if (is_android) { configs -= [ "//build/config/android:hide_all_but_jni_onload" ] @@ -731,7 +713,7 @@ shared_library("libGLESv1_CM${angle_libs_suffix}") { } static_library("libGLESv1_CM_static") { - sources = rebase_path(gles_gypi.libglesv1_cm_sources, ".", "src") + sources = rebase_path(libglesv1_cm_sources, ".", "src") configs -= angle_undefine_configs configs += [ @@ -750,7 +732,7 @@ static_library("libGLESv1_CM_static") { } shared_library("libEGL${angle_libs_suffix}") { - sources = rebase_path(gles_gypi.libegl_sources, ".", "src") + sources = rebase_path(libegl_sources, ".", "src") if (is_android) { configs -= [ "//build/config/android:hide_all_but_jni_onload" ] @@ -790,7 +772,7 @@ shared_library("libEGL${angle_libs_suffix}") { } static_library("libEGL_static") { - sources = rebase_path(gles_gypi.libegl_sources, ".", "src") + sources = rebase_path(libegl_sources, ".", "src") configs -= angle_undefine_configs configs += [ @@ -808,10 +790,7 @@ static_library("libEGL_static") { ] } -util_gypi = exec_script("//build/gypi_to_gn.py", - [ rebase_path("util/util.gyp") ], - "scope", - [ "util/util.gyp" ]) +import("util/util.gyp") config("angle_util_config") { include_dirs = [ "util" ] @@ -836,15 +815,15 @@ foreach(is_shared_library, } target(library_type, library_name) { - sources = rebase_path(util_gypi.util_sources, ".", "util") + sources = rebase_path(util_sources, ".", "util") if (is_win) { - sources += rebase_path(util_gypi.util_win32_sources, ".", "util") + sources += rebase_path(util_win32_sources, ".", "util") } libs = [] if (is_linux) { - sources += rebase_path(util_gypi.util_linux_sources, ".", "util") + sources += rebase_path(util_linux_sources, ".", "util") libs += [ "rt", "dl", @@ -852,7 +831,7 @@ foreach(is_shared_library, } if (is_mac) { - sources += rebase_path(util_gypi.util_osx_sources, ".", "util") + sources += rebase_path(util_osx_sources, ".", "util") libs += [ "AppKit.framework", "QuartzCore.framework", @@ -860,7 +839,7 @@ foreach(is_shared_library, } if (use_x11) { - sources += rebase_path(util_gypi.util_x11_sources, ".", "util") + sources += rebase_path(util_x11_sources, ".", "util") } if (is_android) { @@ -870,8 +849,8 @@ foreach(is_shared_library, # To prevent linux sources filtering on android set_sources_assignment_filter([]) - sources += rebase_path(util_gypi.util_linux_sources, ".", "util") - sources += rebase_path(util_gypi.util_android_sources, ".", "util") + sources += rebase_path(util_linux_sources, ".", "util") + sources += rebase_path(util_android_sources, ".", "util") libs += [ "android", "log", @@ -879,7 +858,7 @@ foreach(is_shared_library, } if (use_ozone) { - sources += rebase_path(util_gypi.util_ozone_sources, ".", "util") + sources += rebase_path(util_ozone_sources, ".", "util") } configs += [ diff --git a/DEPS b/DEPS index c3ab1b391..502ecd29d 100644 --- a/DEPS +++ b/DEPS @@ -107,11 +107,6 @@ deps = { 'url': '{chromium_git}/chromium/src/tools/clang.git@99ac9bf4ad0d629e1168a0bda9a82f87062ce106', 'condition': 'not build_with_chromium', }, - - '{angle_root}/tools/gyp': { - 'url': '{chromium_git}/external/gyp@4d467626b0b9f59a85fb81ca4d7ea9eca99b9d8f', - 'condition': 'not build_with_chromium', - }, } hooks = [ @@ -231,13 +226,6 @@ hooks = [ '-s', '{angle_root}/build/toolchain/win/rc/win/rc.exe.sha1', ], }, - - { - # A change to a .gyp, .gypi, or to GYP itself should run the generator. - 'pattern': '.', - 'action': ['python', '{angle_root}/gyp/gyp_angle'], - 'condition': 'not build_with_chromium', - }, ] recursedeps = [ diff --git a/README.md b/README.md index d711747f0..ff346e440 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ ANGLE repository is hosted by Chromium project and can be ## Building -View the [Dev setup instructions](doc/DevSetup.md). For generating a Windows Store version of ANGLE view the [Windows Store instructions](doc/BuildingAngleForWindowsStore.md) +View the [Dev setup instructions](doc/DevSetup.md). ## Contributing diff --git a/doc/BuildingAngleForWindowsStore.md b/doc/BuildingAngleForWindowsStore.md deleted file mode 100644 index f7949ce5b..000000000 --- a/doc/BuildingAngleForWindowsStore.md +++ /dev/null @@ -1,58 +0,0 @@ -# How to build ANGLE for Windows Store - -Building for Windows Store is deprecated because it requires [GYP](gyp.md). - -ANGLE provides OpenGL ES 2.0 and EGL 1.4 libraries and dlls. You can use these to build and run OpenGL ES 2.0 applications on Windows. - -## Development setup - -ANGLE for Windows Store uses most of the same steps found in [ANGLE Development](DevSetup.md) with a few changes. - -### Required Tools - * [Visual Studio Community 2015](http://www.visualstudio.com/downloads/download-visual-studio-vs) - * Required to build ANGLE on Windows and for the packaged Windows 10 SDK. - - -### Getting the source -Set the following environment variables as needed: - - * `GYP_GENERATORS` to `msvs` - * `GYP_MSVS_VERSION` to `2015` - * `GYP_GENERATE_WINRT` to `1` - -Download the ANGLE source by running the following commands: - -``` -git clone https://chromium.googlesource.com/angle/angle -cd angle -python scripts/bootstrap.py -gclient sync -git checkout master -``` - -Gyp will generate multiple VS2015 solution files - * `winrt/10/src/angle.sln` for Windows 10 - - -### Building ANGLE - 1. Open one of the ANGLE Visual Studio solution files (see [Getting the source](#getting-the-source)). - 2. Select Build -> Configuration Manager - 3. In the "Active solution configuration:" drop down, select the desired configuration (eg. Release), and close the Configuration Manager. - 4. Select Build -> Build Solution. -Once the build completes, the output directory for your selected configuration (eg. `Release_Win32`, located next to the solution file) will contain the required libraries and dlls to build and run an OpenGL ES 2.0 application. - -### To Use ANGLE in Your Application - 1. A template for creating a Windows Store application that uses ANGLE can be found [here](http://blogs.msdn.com/b/vcblog/archive/2015/07/30/cross-platform-code-sharing-with-visual-c.aspx). - 2. Configure your build environment to have access to the `include` folder to provide access to the standard Khronos EGL and GLES2 header files. - * For Visual C++ - * Right-click your project in the _Solution Explorer_, and select _Properties_. - * Under the _Configuration Properties_ branch, click _C/C++_. - * Add the relative path to the Khronos EGL and GLES2 header files to _Additional Include Directories_. - 3. Configure your build environment to have access to `libEGL.lib` and `libGLESv2.lib` found in the build output directory (see [Building ANGLE](DevSetup.md#building-with-visual-studio)). - * For Visual C++ - * Right-click your project in the _Solution Explorer_, and select _Properties_. - * Under the _Configuration Properties_ branch, open the _Linker_ branch and click _Input_. - * Add the relative paths to both the `libEGL.lib` file and `libGLESv2.lib` file to _Additional Dependencies_, separated by a semicolon. - 4. Copy `libEGL.dll` and `libGLESv2.dll` from the build output directory (see [Building ANGLE](DevSetup.md#building-with-visual-studio)) into your application folder or packages location if a ANGLE Windows Store NuGet was used. - 5. Code your application to the Khronos [OpenGL ES 2.0](http://www.khronos.org/registry/gles/) and [EGL 1.4](http://www.khronos.org/registry/egl/) APIs. - diff --git a/doc/ContributingCode.md b/doc/ContributingCode.md index 382d9499d..cbf0abc1d 100644 --- a/doc/ContributingCode.md +++ b/doc/ContributingCode.md @@ -15,8 +15,8 @@ ### Build maintenance 1. If you added or removed source files: - * You _must_ update the gyp build scripts lists with your changes. See `src/libEGL.gypi`, `src/libGLESv2.gypi`, and `src/compiler.gypi`. - 2. ANGLE also now maintains a BUILD.gn script for [Chromium's gn build](https://www.chromium.org/developers/gn-build-configuration). If you changed the gyp files other than to add or remove new files, you will also need to update BUILD.gn. Ask a project member for help with testing if you don't have a Chromium checkout. + * You _must_ update the build files with your changes. See `src/libGLESv2.gypi` and `src/compiler.gypi`. + 2. ANGLE's BUILD.gn script is used by [Chromium's gn build](https://www.chromium.org/developers/gn-build-configuration). If you change build files other than to add or remove source files be aware you could break the Chromium build. ANGLE's commit queue (CQ) will detect such breakage. Ask a project member for help with Chromium issues if you don't have a Chromium checkout. 3. If you modified `glslang.y` or `glslang.l`: * You _must_ update the bison-generated compiler sources. Download and install the latest 64-bit Bison and flex from official [Cygwin](https://cygwin.com/install.html) on _Windows_. From the Cygwin shell run `generate_parser.sh` in `src/compiler/translator` and update your CL. Do not edit the generated files by hand. * _NOTE:_ You can ignore failing chunk messages if there are no compile errors. diff --git a/doc/DebuggingTips.md b/doc/DebuggingTips.md index 55ef6d3e5..0afced8cd 100644 --- a/doc/DebuggingTips.md +++ b/doc/DebuggingTips.md @@ -4,7 +4,7 @@ There are many ways to debug ANGLE using generic or platform-dependent tools. He ## Running ANGLE under apitrace on Linux -[Apitrace](http://apitrace.github.io/) that captures traces of OpenGL commands for later analysis, allowing us to see how ANGLE translates OpenGL ES commands. In order to capture the trace, it inserts a driver shim using `LD_PRELOAD` that records the command and then forwards it to the OpenGL driver. +[Apitrace](http://apitrace.github.io/) captures traces of OpenGL commands for later analysis, allowing us to see how ANGLE translates OpenGL ES commands. In order to capture the trace, it inserts a driver shim using `LD_PRELOAD` that records the command and then forwards it to the OpenGL driver. The problem with ANGLE is that it exposes the same symbols as the OpenGL driver so apitrace captures the entry point calls intended for ANGLE and reroutes them to the OpenGL driver. In order to avoid this problem, use the following: @@ -14,7 +14,7 @@ The problem with ANGLE is that it exposes the same symbols as the OpenGL driver If you follow these steps, apitrace will work correctly aside from a few minor bugs like not being able to figure out what the default framebuffer size is if there is no glViewport command. -For example, to trace a run of `hello_triangle`, assuming you are using the ninja gyp generator and the apitrace executables are in `$PATH`: +For example, to trace a run of `hello_triangle`, assuming the apitrace executables are in `$PATH`: ``` gn args out/Debug # add "angle_link_glx = true" @@ -60,4 +60,4 @@ Example "Intent Arguments:" values in GAPID's "Capture Trace" dialog: or ``` -e org.chromium.native_test.NativeTest.StdoutFile /sdcard/chromium_tests_root/out.txt --esal org.chromium.native_test.NativeTest.Shard RendererTest.SimpleOperation/ES2_VULKAN,SimpleOperationTest.DrawWithTexture/ES2_VULKAN -``` \ No newline at end of file +``` diff --git a/doc/DevSetup.md b/doc/DevSetup.md index 9cbf50a54..c87762ca8 100644 --- a/doc/DevSetup.md +++ b/doc/DevSetup.md @@ -10,7 +10,7 @@ ANGLE uses git for version control. If you are not familiar with git, helpful do ### Required Tools On all platforms: - * GN is the supported build system. GYP is deprecated and support will be removed in the future but [instructions are available](gyp.md). + * GN is the build system. GYP support has been removed. * Clang will be set up by the build system and used by default. See below for platform-specific compiler choices. * [depot_tools](http://dev.chromium.org/developers/how-tos/install-depot-tools) * Required to generate projects and build files, contribute patches, run the unit tests or build the shader compiler on non-Windows systems. diff --git a/doc/gyp.md b/doc/gyp.md deleted file mode 100644 index 70938221f..000000000 --- a/doc/gyp.md +++ /dev/null @@ -1,31 +0,0 @@ -# Deprecated GYP Instructions - -Use GN instead of GYP, as described in the [developer instructions](DevSetup.md). -Support for GYP will be removed in the future. - -Though deprecated, GYP is still run by `gclient sync`. -You may want to set certain environment variables ahead of time. - -On Windows: - - * `GYP_GENERATORS` to `msvs` (other options include `ninja` and `make`) - * `GYP_MSVS_VERSION` to `2015` - -On Linux and MacOS: - - * `GYP_GENERATORS` to `ninja` (defaults to 'make' that pollutes your source directory) - -To run GYP at other times use the script `gyp/gyp_angle`. - - -## Running ANGLE under apitrace on Linux - -See the [debugging tips](DebuggingTips.md#running-angle-under-apitrace-on-linux) and replace the gn steps with: - -``` -gyp/gyp_angle -D angle_link_glx=1 -D angle_gl_library_type=static_library -``` - -# Deprecated Windows Store Instructions - -[Building for Windows Store](BuildingAngleForWindowsStore.md) is deprecated because it requires GYP. diff --git a/dotfile_settings.gni b/dotfile_settings.gni index 0d37d3143..8c370c36f 100644 --- a/dotfile_settings.gni +++ b/dotfile_settings.gni @@ -8,7 +8,6 @@ angle_dotfile_settings = { exec_script_whitelist = [ get_path_info("BUILD.gn", "abspath"), - get_path_info("src/tests/BUILD.gn", "abspath"), get_path_info("third_party/vulkan-headers/BUILD.gn", "abspath"), get_path_info("third_party/vulkan-loader/BUILD.gn", "abspath"), get_path_info("third_party/vulkan-tools/BUILD.gn", "abspath"), diff --git a/gyp/ANGLE.gyp b/gyp/ANGLE.gyp deleted file mode 100644 index f81871321..000000000 --- a/gyp/ANGLE.gyp +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': - [ - { - 'target_name': 'All', - 'type': 'none', - 'dependencies': - [ - '../src/angle.gyp:*', - '../src/tests/tests.gyp:*', - ], - 'conditions': - [ - # Don't generate samples for WinRT - ['angle_build_winrt==0', - { - 'dependencies': - [ - '../samples/samples.gyp:*', - ], - }], - ], - }, - ], -} diff --git a/gyp/common.gypi b/gyp/common.gypi deleted file mode 100644 index e56499da4..000000000 --- a/gyp/common.gypi +++ /dev/null @@ -1,458 +0,0 @@ -# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'includes': [ 'common_defines.gypi', ], - 'variables': - { - 'angle_path': '<(DEPTH)', - 'angle_build_winrt%': '0', - 'angle_build_winrt_app_type_revision%': '10.0', - 'angle_build_winrt_target_platform_ver%' : '', - # angle_code is set to 1 for the core ANGLE targets defined in src/build_angle.gyp. - # angle_code is set to 0 for test code, sample code, and third party code. - # When angle_code is 1, we build with additional warning flags on Mac and Linux. - 'angle_code%': 0, - 'release_symbols%': 'true', - 'gcc_or_clang_warnings': - [ - '-Wall', - '-Wchar-subscripts', - '-Werror', - '-Wextra', - '-Wformat=2', - '-Winit-self', - '-Wno-format-nonliteral', - '-Wno-unknown-pragmas', - '-Wno-unused-function', - '-Wno-unused-parameter', - '-Wpacked', - '-Wpointer-arith', - '-Wundef', - '-Wwrite-strings', - ], - 'gcc_or_clang_warnings_cc': - [ - '-Wnon-virtual-dtor', - ], - - # TODO: Pull chromium's clang dep. - 'clang%': 0, - - 'clang_only_warnings': - [ - '-Wshorten-64-to-32', - ], - }, - 'target_defaults': - { - 'default_configuration': 'Debug', - 'variables': - { - 'warn_as_error%': 1, - }, - 'target_conditions': - [ - ['warn_as_error == 1', - { - 'msvs_settings': - { - 'VCCLCompilerTool': - { - 'WarnAsError': 'true', - }, - 'VCLinkerTool': - { - 'TreatLinkerWarningAsErrors': 'true', - }, - }, - }], - ], - 'conditions': - [ - ['angle_build_winrt==1', - { - 'msvs_enable_winrt' : '1', - 'msvs_application_type_revision' : '<(angle_build_winrt_app_type_revision)', - 'msvs_target_platform_version' : '<(angle_build_winrt_target_platform_ver)', - }], - ], - 'configurations': - { - 'Common_Base': - { - 'abstract': 1, - # Require the version of the Windows 10 SDK installed on the local machine. - 'msvs_windows_sdk_version': 'v10.0', - 'msvs_configuration_attributes': - { - 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)_$(Platform)', - 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', - 'CharacterSet': '0', # ASCII - }, - 'msvs_settings': - { - 'VCCLCompilerTool': - { - # Control Flow Guard is a security feature in Windows - # 8.1 and higher designed to prevent exploitation of - # indirect calls in executables. - # Control Flow Guard is enabled using the /d2guard4 - # compiler setting in combination with the /guard:cf - # linker setting. - 'AdditionalOptions': ['/MP', '/d2guard4'], - 'BufferSecurityCheck': 'true', - 'DebugInformationFormat': '3', - 'ExceptionHandling': '0', - 'EnableFunctionLevelLinking': 'true', - 'MinimalRebuild': 'false', - 'WarningLevel': '4', - 'conditions': - [ - ['angle_build_winrt==1', - { - # Use '/Wv:18' to avoid WRL warnings in VS2015 Update 3 - # Use /Gw and /Zc:threadSafeInit to avoid - # LTCG-related crashes with VS2015 Update 3 - 'AdditionalOptions': ['/Wv:18', '/Gw', '/Zc:threadSafeInit-'], - }], - ], - }, - 'VCLinkerTool': - { - # Control Flow Guard is a security feature in Windows - # 8.1 and higher designed to prevent exploitation of - # indirect calls in executables. - # Control Flow Guard is enabled using the /d2guard4 - # compiler setting in combination with the /guard:cf - # linker setting. - 'AdditionalOptions': ['/guard:cf'], - 'FixedBaseAddress': '1', - 'ImportLibrary': '$(OutDir)\\lib\\$(TargetName).lib', - 'MapFileName': '$(OutDir)\\$(TargetName).map', - # Most of the executables we'll ever create are tests - # and utilities with console output. - 'SubSystem': '1', # /SUBSYSTEM:CONSOLE - }, - 'VCResourceCompilerTool': - { - 'Culture': '1033', - }, - }, - 'xcode_settings': - { - 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', - }, - }, # Common_Base - - 'Debug_Base': - { - 'abstract': 1, - 'defines': - [ - '_DEBUG' - ], - 'msvs_settings': - { - 'VCCLCompilerTool': - { - 'Optimization': '0', # /Od - 'BasicRuntimeChecks': '3', - 'RuntimeTypeInfo': 'true', - 'conditions': - [ - ['angle_build_winrt==1', - { - # Use the dynamic C runtime to match - # Windows Application Store requirements - - # The C runtime for Windows Store applications - # is a framework package that is managed by - # the Windows deployment model and can be - # shared by multiple packages. - - 'RuntimeLibrary': '3', # /MDd (debug dll) - }, - { - # Use the static C runtime to - # match chromium and make sure - # we don't depend on the dynamic - # runtime's shared heaps - 'RuntimeLibrary': '1', # /MTd (debug static) - }], - ], - }, - 'VCLinkerTool': - { - 'GenerateDebugInformation': 'true', - 'LinkIncremental': '2', - 'conditions': - [ - ['angle_build_winrt==1', - { - 'AdditionalDependencies': - [ - 'dxgi.lib', - ], - 'EnableCOMDATFolding': '1', # disable - 'OptimizeReferences': '1', # disable - }], - ], - }, - }, - 'xcode_settings': - { - 'COPY_PHASE_STRIP': 'NO', - 'GCC_OPTIMIZATION_LEVEL': '0', - }, - }, # Debug_Base - - 'Release_Base': - { - 'abstract': 1, - 'defines': - [ - 'NDEBUG' - ], - 'msvs_settings': - { - 'VCCLCompilerTool': - { - 'RuntimeTypeInfo': 'false', - - 'conditions': - [ - ['angle_build_winrt==1', - { - # Use Chromium's settings for 'Official' builds - # to optimize WinRT release builds - 'Optimization': '1', # /O1, minimize size - 'FavorSizeOrSpeed': '2', # /Os - 'WholeProgramOptimization': 'true', - - # Use the dynamic C runtime to match - # Windows Application Store requirements - - # The C runtime for Windows Store applications - # is a framework package that is managed by - # the Windows deployment model and can be - # shared by multiple packages. - 'RuntimeLibrary': '2', # /MD (nondebug dll) - }, - { - 'Optimization': '2', # /O2, maximize speed - - # Use the static C runtime to - # match chromium and make sure - # we don't depend on the dynamic - 'RuntimeLibrary': '0', # /MT (nondebug static) - }], - ], - }, - 'VCLinkerTool': - { - 'GenerateDebugInformation': '<(release_symbols)', - 'LinkIncremental': '1', - - 'conditions': - [ - ['angle_build_winrt==1', - { - # Use Chromium's settings for 'Official' builds - # to optimize WinRT release builds - 'LinkTimeCodeGeneration': '1', - 'AdditionalOptions': ['/cgthreads:8'], - }], - ], - }, - }, - }, # Release_Base - - 'x86_Base': - { - 'abstract': 1, - 'msvs_configuration_platform': 'Win32', - 'msvs_settings': - { - 'VCLinkerTool': - { - 'TargetMachine': '1', # x86 - }, - 'VCLibrarianTool': - { - 'TargetMachine': '1', # x86 - }, - }, - 'defines': [ 'ANGLE_IS_32_BIT_CPU' ], - }, # x86_Base - - 'x64_Base': - { - 'abstract': 1, - 'msvs_configuration_platform': 'x64', - 'msvs_settings': - { - 'VCLinkerTool': - { - 'TargetMachine': '17', # x86 - 64 - }, - 'VCLibrarianTool': - { - 'TargetMachine': '17', # x86 - 64 - }, - }, - 'defines': [ 'ANGLE_IS_64_BIT_CPU' ], - }, # x64_Base - - # Concrete configurations - 'Debug': - { - 'inherit_from': ['Common_Base', 'x86_Base', 'Debug_Base'], - }, - 'Release': - { - 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'], - }, - 'conditions': - [ - ['OS == "win"', - { - 'Debug_x64': - { - 'inherit_from': ['Common_Base', 'x64_Base', 'Debug_Base'], - }, - 'Release_x64': - { - 'inherit_from': ['Common_Base', 'x64_Base', 'Release_Base'], - }, - }], - ['angle_build_winrt==1', - { - 'arm_Base': - { - 'abstract': 1, - 'msvs_configuration_platform': 'ARM', - 'msvs_settings': - { - 'VCLinkerTool': - { - 'TargetMachine': '3', # ARM - }, - 'VCLibrarianTool': - { - 'TargetMachine': '3', # ARM - }, - }, - }, # arm_Base - 'Debug_ARM': - { - 'inherit_from': ['Common_Base', 'arm_Base', 'Debug_Base'], - }, - 'Release_ARM': - { - 'inherit_from': ['Common_Base', 'arm_Base', 'Release_Base'], - }, - }], - ], - }, # configurations - }, # target_defaults - 'conditions': - [ - ['OS == "win"', - { - 'target_defaults': - { - 'msvs_cygwin_dirs': ['../third_party/cygwin'], - }, - }, - { # OS != win - 'target_defaults': - { - 'cflags': - [ - '-fPIC', - ], - 'cflags_cc': - [ - '-std=c++14', - ], - }, - }], - ['OS != "win" and OS != "mac"', - { - 'target_defaults': - { - 'cflags': - [ - '-pthread', - ], - 'cflags_cc': - [ - '-fno-exceptions', - ], - 'ldflags': - [ - '-pthread', - ], - 'configurations': - { - 'Debug': - { - 'variables': - { - 'debug_optimize%': '0', - }, - 'defines': - [ - '_DEBUG', - ], - 'cflags': - [ - '-O>(debug_optimize)', - '-g', - ], - } - }, - }, - }], - ['angle_code==1', - { - 'target_defaults': - { - 'conditions': - [ - ['OS == "mac"', - { - 'xcode_settings': - { - 'WARNING_CFLAGS': ['<@(gcc_or_clang_warnings)'] - }, - }], - ['OS != "win" and OS != "mac"', - { - 'cflags_c': - [ - '<@(gcc_or_clang_warnings)', - '-std=c99', - ], - 'cflags_cc': - [ - '<@(gcc_or_clang_warnings_cc)', - ], - 'defines': - [ - 'SYSCONFDIR="/etc"', - 'FALLBACK_CONFIG_DIRS="/etc/xdg"', - 'FALLBACK_DATA_DIRS="/usr/local/share:/usr/share"', - ], - }], - ['clang==1', - { - 'cflags': ['<@(clang_only_warnings)'] - }], - ] - } - }], - ], -} diff --git a/gyp/common_defines.gypi b/gyp/common_defines.gypi deleted file mode 100644 index bce49c4c2..000000000 --- a/gyp/common_defines.gypi +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': - { - 'component%': 'static_library', - 'use_libpci%': 1, - 'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/10', - - 'angle_build_winrt%': '0', - - # This works like the Ozone GBM platform in Chrome: - # - Generic Buffer Manager (gbm) to allocate buffers - # - EGL_EXT_image_dma_buf_import to render into those buffers via EGLImage - # - Direct Rendering Manager + Kernel Mode Setting to scan out from those buffers - # - EGL_PLATFORM_SURFACELESS because there are no native windows - 'use_ozone%': 0, - - 'conditions': - [ - ['OS=="linux" and use_x11==1 and chromeos==0', { - 'angle_use_glx%': 1, - }, - { - 'angle_use_glx%': 0, - }], - ], - - # root of the OSX SDK for Chromium builds, the system root for standalone builds - 'SDKROOT%': "", - }, - 'defines': - [ - 'ANGLE_STANDALONE_BUILD', - ], - 'msvs_disabled_warnings': - [ - 4100, # Unreferenced formal parameter. Not interesting. - 4127, # conditional expression is constant. Too noisy to be useful. - 4718, # Recursive call has no side effects. Fires on xtree system header. - 4251, # STL objects do not have DLL interface, needed by ShaderVars.h and angle_util - ], - 'conditions': - [ - ['use_ozone==1', - { - 'defines': [ 'USE_OZONE' ], - }], - ['component=="shared_library"', - { - 'defines': [ 'COMPONENT_BUILD' ], - }], - ], - 'msvs_settings': - { - 'VCCLCompilerTool': - { - 'PreprocessorDefinitions': - [ - '_CRT_SECURE_NO_DEPRECATE', - '_SCL_SECURE_NO_WARNINGS', - '_HAS_EXCEPTIONS=0', - 'NOMINMAX', - ], - }, - 'VCLinkerTool': - { - 'conditions': - [ - ['angle_build_winrt==0', - { - 'AdditionalDependencies': - [ - 'kernel32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'user32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'delayimp.lib', - ], - }], - # winrt compilation is dynamic depending on the project - # type. AdditionalDependencies is automatically configured - # with the required .libs - ['angle_build_winrt==1', - { - 'AdditionalDependencies': - [ - '%(AdditionalDependencies)', - 'uuid.lib', - ], - }], - ], - }, - }, - - # Windows SDK library directories for the configurations - 'configurations': - { - 'conditions': - [ - ['angle_build_winrt==0', - { - 'x86_Base': - { - 'abstract': 1, - 'msvs_settings': - { - 'VCLinkerTool': - { - 'AdditionalLibraryDirectories': - [ - '<(windows_sdk_path)/Lib/winv6.3/um/x86', - ], - }, - 'VCLibrarianTool': - { - 'AdditionalLibraryDirectories': - [ - '<(windows_sdk_path)/Lib/winv6.3/um/x86', - ], - }, - }, - }, - 'x64_Base': - { - 'abstract': 1, - 'msvs_settings': - { - 'VCLinkerTool': - { - 'AdditionalLibraryDirectories': - [ - '<(windows_sdk_path)/Lib/winv6.3/um/x64', - ], - }, - 'VCLibrarianTool': - { - 'AdditionalLibraryDirectories': - [ - '<(windows_sdk_path)/Lib/winv6.3/um/x64', - ], - }, - }, - }, - }], - ], - }, -} diff --git a/gyp/gyp_angle b/gyp/gyp_angle deleted file mode 100755 index 8651f16aa..000000000 --- a/gyp/gyp_angle +++ /dev/null @@ -1,83 +0,0 @@ -#!/usr/bin/python - -# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# This script is wrapper for ANGLE that adds some support for how GYP -# is invoked by ANGLE beyond what can be done in the gclient hooks. - -import os -import sys - -script_dir = os.path.dirname(__file__) -angle_dir = os.path.normpath(os.path.join(script_dir, os.pardir)) - -sys.path.insert(0, os.path.join(angle_dir, 'tools', 'gyp', 'pylib')) -import gyp - -def appendCommonArgs(args): - # Set the depth to get the top-level Makefile generated into the - # correct directory. This only has an effect on Linux. - args.append('--depth'); - args.append('.'); - # Add standalone.gypi to the include path to set required - # variables that are otherwise picked up from Chromium's gyp - # files. - args.append('-I' + os.path.join(script_dir, 'standalone.gypi')) - # Add common.gypi to the include path. - args.append('-I' + os.path.join(script_dir, 'common.gypi')) - args.append('--no-parallel') - -def generateProjects(generate_args): - args = generate_args - appendCommonArgs(args) - # Add all.gyp as the main gyp file to be generated. - args.append(os.path.join(script_dir, 'ANGLE.gyp')) - - gyp.main(args) - -def generateWinRTProjects(generate_args, generation_dir, msvs_version, app_type_rev, - target_platform_ver): - args = generate_args - appendCommonArgs(args) - - args.append('--ignore-environment') - args.append('--generator-output=' + generation_dir) - args.append('--format=msvs') - args.append('-Gmsvs_version=' + msvs_version) - args.append('-Dangle_use_commit_id=1') - args.append('-Dangle_build_winrt=1') - args.append('-Dangle_build_winrt_app_type_revision=' + app_type_rev) - args.append('-Dangle_build_winrt_target_platform_ver=' + target_platform_ver) - args.append('-Dangle_enable_d3d9=0') - args.append('-Dangle_enable_gl=0') - args.append('-Dangle_enable_vulkan=0') - args.append('-Dangle_enable_null=0') - args.append('-Dangle_enable_essl=0') - args.append('-Dangle_enable_glsl=0') - # Add all.gyp as the main gyp file to be generated. - args.append(os.path.join(script_dir, 'ANGLE.gyp')) - - print 'Generating WinRT projects to ' + generation_dir + ' from gyp files...' - sys.stdout.flush() - - gyp.main(args) - -if __name__ == '__main__': - print - print '* * * WARNING: GYP IS DEPRECATED * * *' - print 'See https://chromium.googlesource.com/angle/angle/+/master/doc/DevSetup.md for new build instructions.' - print - print 'Updating projects from gyp files...' - sys.stdout.flush() - - # Generate projects - args = sys.argv[1:] - generateProjects(args) - - # Generate WinRT projects only if configured - if 'GYP_GENERATE_WINRT' in os.environ: - # Generate Windows 10 projects - args = sys.argv[1:] - generateWinRTProjects(args, "winrt/10", "2015", "10.0", "10.0.10240.0"); diff --git a/gyp/standalone.gypi b/gyp/standalone.gypi deleted file mode 100644 index f18cc04bb..000000000 --- a/gyp/standalone.gypi +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright (c) 2014 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': - { - # chromeos=1 is used in some build configurations to disable GL - # and GLX code because it typically wouldn't build for Chrome OS. - # It does not mean "enable Chrome OS code." - 'chromeos': 0, - - # Chrome OS chroot builds need a special pkg-config, so make it possible to change. - 'pkg-config%': 'pkg-config', - - # Use a nested variable trick to get use_x11 evaluated more - # eagerly than other conditional variables. - 'variables': - { - 'variables': - { - 'use_ozone%': 0, - }, - 'conditions': - [ - ['OS=="linux" and use_ozone==0', - { - 'use_x11': 1, - }, - { - 'use_x11': 0, - }], - ], - - # Copy conditionally-set variables out one scope. - 'use_ozone%': '<(use_ozone)', - }, - - # Copy conditionally-set variables out one scope. - 'use_x11%': '<(use_x11)', - }, -} diff --git a/gyp/touch_stamp.py b/gyp/touch_stamp.py deleted file mode 100644 index 162f435cf..000000000 --- a/gyp/touch_stamp.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/python -# -# Copyright (c) 2015 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# touch_stamp.py: similar to the Unix touch command, used to manual make -# stamp files when building with GYP - -import os -import sys - -stamp_name = sys.argv[1] - -with open(stamp_name, 'a'): - os.utime(stamp_name, None) diff --git a/gyp/warnings.gyp b/gyp/warnings.gyp deleted file mode 100644 index a010427f1..000000000 --- a/gyp/warnings.gyp +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (c) 2017 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': - [ - { - 'target_name': 'gyp_deprecation', - 'type': 'none', - 'actions': - [ - { - 'action_name': 'GYP deprecation warning', - 'message': ' * * * WARNING: GYP IS DEPRECATED * * *', - 'inputs': [], - 'outputs': - [ - # this file is never created and should not exist so the action always runs - 'this_file_never_exists', - ], - 'action': - [ - 'python', '-c', 'print "See https://chromium.googlesource.com/angle/angle/+/master/doc/DevSetup.md for new build instructions."', - ], - }, - ], - }, - ], -} diff --git a/samples/samples.gyp b/samples/samples.gyp deleted file mode 100644 index 7ad65d490..000000000 --- a/samples/samples.gyp +++ /dev/null @@ -1,240 +0,0 @@ -# Copyright (c) 2010 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': - { - 'dependencies': - [ - '../gyp/warnings.gyp:gyp_deprecation', - ], - }, - - 'targets': - [ - { - 'target_name': 'shader_translator', - 'type': 'executable', - 'includes': [ '../gyp/common_defines.gypi', ], - 'dependencies': [ '../src/angle.gyp:translator', ], - 'include_dirs': [ '../include', ], - 'sources': [ 'shader_translator/shader_translator.cpp' ], - }, - { - 'target_name': 'sample_util', - 'type': 'static_library', - 'includes': [ '../gyp/common_defines.gypi', ], - 'dependencies': - [ - '<(angle_path)/src/angle.gyp:angle_common', - '<(angle_path)/src/angle.gyp:libEGL', - '<(angle_path)/src/angle.gyp:libGLESv2', - '<(angle_path)/util/util.gyp:angle_util', - ], - 'export_dependent_settings': - [ - '<(angle_path)/src/angle.gyp:angle_common', - '<(angle_path)/util/util.gyp:angle_util', - ], - 'include_dirs': - [ - '<(angle_path)/include', - 'sample_util', - ], - 'sources': - [ - 'sample_util/SampleApplication.cpp', - 'sample_util/SampleApplication.h', - 'sample_util/texture_utils.cpp', - 'sample_util/texture_utils.h', - 'sample_util/tga_utils.cpp', - 'sample_util/tga_utils.h', - ], - 'defines': - [ - 'GL_GLEXT_PROTOTYPES', - 'EGL_EGLEXT_PROTOTYPES', - ], - 'msvs_disabled_warnings': [ 4201 ], - 'direct_dependent_settings': - { - 'msvs_disabled_warnings': [ 4201 ], - 'include_dirs': - [ - 'sample_util', - ], - 'defines': - [ - 'GL_GLEXT_PROTOTYPES', - 'EGL_EGLEXT_PROTOTYPES', - ], - }, - }, - { - 'target_name': 'hello_triangle', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'hello_triangle/HelloTriangle.cpp', ], - }, - { - 'target_name': 'mip_map_2d', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'mip_map_2d/MipMap2D.cpp', ], - }, - { - 'target_name': 'multi_texture', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'multi_texture/MultiTexture.cpp', ], - 'copies': - [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': - [ - 'multi_texture/basemap.tga', - 'multi_texture/lightmap.tga', - ], - }, - ] - }, - - { - 'target_name': 'multi_window', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'multi_window/MultiWindow.cpp', ], - }, - - { - 'target_name': 'multiple_draw_buffers', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'multiple_draw_buffers/MultipleDrawBuffers.cpp', ], - 'copies': - [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': - [ - 'multiple_draw_buffers/multiple_draw_buffers_copy_fs.glsl', - 'multiple_draw_buffers/multiple_draw_buffers_fs.glsl', - 'multiple_draw_buffers/multiple_draw_buffers_vs.glsl', - ], - } - ] - }, - - { - 'target_name': 'multiview', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'multiview/Multiview.cpp', ], - }, - - { - 'target_name': 'particle_system', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'particle_system/ParticleSystem.cpp', ], - 'copies': - [ - { - 'destination': '<(PRODUCT_DIR)', - 'files': - [ - 'particle_system/smoke.tga', - ], - } - ] - }, - { - 'target_name': 'post_sub_buffer', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'post_sub_buffer/PostSubBuffer.cpp', ], - }, - - { - 'target_name': 'simple_instancing', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'simple_instancing/SimpleInstancing.cpp', ], - }, - - { - 'target_name': 'simple_texture_2d', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'simple_texture_2d/SimpleTexture2D.cpp', ], - }, - - { - 'target_name': 'simple_texture_cubemap', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'simple_texture_cubemap/SimpleTextureCubemap.cpp', ], - }, - - { - 'target_name': 'simple_vertex_shader', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'simple_vertex_shader/SimpleVertexShader.cpp', ], - }, - - { - 'target_name': 'stencil_operations', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'stencil_operations/StencilOperations.cpp', ], - }, - - { - 'target_name': 'tex_redef_microbench', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'tex_redef_microbench/TexRedefMicroBench.cpp', ], - }, - - { - 'target_name': 'texture_wrap', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'texture_wrap/TextureWrap.cpp', ], - }, - - { - 'target_name': 'tri_fan_microbench', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'tri_fan_microbench/TriFanMicroBench.cpp', ], - }, - - { - 'target_name': 'window_test', - 'type': 'executable', - 'dependencies': [ 'sample_util' ], - 'includes': [ '../gyp/common_defines.gypi', ], - 'sources': [ 'WindowTest/WindowTest.cpp', ], - }, - ], -} diff --git a/scripts/generate_new_renderer.py b/scripts/generate_new_renderer.py index 4118f15d8..73e5671f0 100755 --- a/scripts/generate_new_renderer.py +++ b/scripts/generate_new_renderer.py @@ -273,7 +273,7 @@ for impl_class in impl_classes: h_file.close() cpp_file.close() -# Print a block of source files to add to the GYP +# Print a block of source files to add to the build print("Generated files:") for impl_class in impl_classes: path = "libANGLE/renderer/" + renderer_name + "/" + impl_class + renderer_suffix diff --git a/scripts/update_canary_angle.py b/scripts/update_canary_angle.py index 8a185d7b5..6cc83bc82 100755 --- a/scripts/update_canary_angle.py +++ b/scripts/update_canary_angle.py @@ -15,10 +15,6 @@ import sys, os, shutil # Set of search paths. source_paths = [ - os.path.join('..', 'gyp', 'Debug_x64'), - os.path.join('..', 'gyp', 'Debug_Win32'), - os.path.join('..', 'gyp', 'Release_x64'), - os.path.join('..', 'gyp', 'Release_Win32'), os.path.join('..', 'out', 'Debug'), os.path.join('..', 'out', 'Debug_x64'), os.path.join('..', 'out', 'Release'), diff --git a/src/angle.gyp b/src/angle.gyp deleted file mode 100644 index 04c9c4f33..000000000 --- a/src/angle.gyp +++ /dev/null @@ -1,486 +0,0 @@ -# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': - { - 'angle_code': 1, - 'angle_gen_path': '<(SHARED_INTERMEDIATE_DIR)/angle', - 'angle_id_script_base': 'commit_id.py', - 'angle_id_script': '<(angle_gen_path)/<(angle_id_script_base)', - 'angle_id_header_base': 'commit.h', - 'angle_id_header': '<(angle_gen_path)/id/<(angle_id_header_base)', - 'angle_use_commit_id%': '