Chromium Code Reviews| Index: docs/getting_started.md |
| diff --git a/docs/getting_started.md b/docs/getting_started.md |
| index 4a0948e683175388de6cb0e478bfcc8ddd3ff91c..d0ff4fc74283d77f3f5bae880f6a2ebb3124f7ea 100644 |
| --- a/docs/getting_started.md |
| +++ b/docs/getting_started.md |
| @@ -14,7 +14,6 @@ Create a working directory, enter it, and run: |
| gclient config https://chromium.googlesource.com/libyuv/libyuv |
| gclient sync |
| - |
| Then you'll get a .gclient file like: |
| solutions = [ |
| @@ -28,7 +27,6 @@ Then you'll get a .gclient file like: |
| }, |
| ]; |
| - |
| For iOS add `;target_os=['ios'];` to your OSX .gclient and run `GYP_DEFINES="OS=ios" gclient sync.` |
| Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/master |
| @@ -36,7 +34,6 @@ Browse the Git reprository: https://chromium.googlesource.com/libyuv/libyuv/+/ma |
| ### Android |
| For Android add `;target_os=['android'];` to your Linux .gclient |
| - |
| solutions = [ |
| { "name" : "libyuv", |
| "url" : "https://chromium.googlesource.com/libyuv/libyuv", |
| @@ -73,36 +70,45 @@ To get just the source (not buildable): |
| ### Windows |
| - set GYP_DEFINES=target_arch=ia32 |
| - call python gyp_libyuv -fninja -G msvs_version=2013 |
| - ninja -j7 -C out\Release |
| - ninja -j7 -C out\Debug |
| + call gn gen out/Release "--args=is_debug=false is_official_build=false target_cpu=\"x86\"" |
|
kjellander_chromium
2016/10/04 06:06:21
I suggest leaving out is_official_build=false sinc
kjellander_chromium
2016/10/04 06:06:21
I find it easier to read without the escaped doubl
fbarchard1
2016/10/04 18:23:45
Done.
|
| + call gn gen out/Debug "--args=is_debug=true is_official_build=false target_cpu=\"x86\"" |
| + ninja -j7 -v -C out/Release |
|
kjellander_chromium
2016/10/04 06:06:21
I'd also leave out -j7 since we can't really make
fbarchard1
2016/10/04 18:23:45
Acknowledged.
If you do more than one thing on the
kjellander_chromium
2016/10/04 18:31:35
Alright, fair enough (and libyuv builds so quickly
|
| + ninja -j7 -v -C out/Debug |
| + |
| + call gn gen out/Release "--args=is_debug=false is_official_build=false target_cpu=\"x64\"" |
| + call gn gen out/Debug "--args=is_debug=true is_official_build=false target_cpu=\"x64\"" |
| + ninja -j7 -v -C out/Release |
| + ninja -j7 -v -C out/Debug |
| - set GYP_DEFINES=target_arch=x64 |
| - call python gyp_libyuv -fninja -G msvs_version=2013 |
| - ninja -C out\Debug_x64 |
| - ninja -C out\Release_x64 |
| +#### Building with clang-cl |
| -#### Building with clangcl |
| set GYP_DEFINES=clang=1 target_arch=ia32 |
| call python tools\clang\scripts\update.py |
| - call python gyp_libyuv -fninja libyuv_test.gyp |
| - ninja -C out\Debug |
| - ninja -C out\Release |
| -### OSX |
| + call gn gen out/Release "--args=is_debug=false is_official_build=false is_clang=true target_cpu=\"x86\"" |
| + call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang=true target_cpu=\"x86\"" |
| + ninja -j7 -v -C out/Release |
| + ninja -j7 -v -C out/Debug |
| + |
| + call gn gen out/Release "--args=is_debug=false is_official_build=false is_clang=true target_cpu=\"x64\"" |
| + call gn gen out/Debug "--args=is_debug=true is_official_build=false is_clang=true target_cpu=\"x64\"" |
| + ninja -j7 -v -C out/Release |
| + ninja -j7 -v -C out/Debug |
| -Clang 64 bit shown. Remove `clang=1` for GCC and change x64 to ia32 for 32 bit. |
| +### OSX and Linux |
|
kjellander_chromium
2016/10/04 06:06:21
OSX -> macOS these days :)
fbarchard1
2016/10/04 18:23:45
Done.
|
| - GYP_DEFINES="clang=1 target_arch=x64" ./gyp_libyuv |
| - ninja -j7 -C out/Debug |
| - ninja -j7 -C out/Release |
| + gn gen out/Release "--args=is_debug=false" |
| + gn gen out/Debug "--args=is_debug=true" |
| + ninja -j7 -v -C out/Release |
| + ninja -j7 -v -C out/Debug |
| - GYP_DEFINES="clang=1 target_arch=ia32" ./gyp_libyuv |
| - ninja -j7 -C out/Debug |
| - ninja -j7 -C out/Release |
| +### Building Offical with GN |
| + |
| + gn gen out/Official "--args=is_debug=false is_official_build=true is_chrome_branded=true" |
| + ninja -C out/Official |
| ### iOS |
| +This section needs an update to GN build documentation. |
| http://www.chromium.org/developers/how-tos/build-instructions-ios |
| Add to .gclient last line: `target_os=['ios'];` |
| @@ -132,44 +138,51 @@ simulator |
| ninja -j7 -C out_sim/Release-iphonesimulator libyuv_unittest |
| ### Android |
| +This section needs an update to GN build documentation. |
|
kjellander_chromium
2016/10/04 06:06:21
Remove this line since you actually does provide A
fbarchard1
2016/10/04 18:23:45
Acknowledged.
|
| https://code.google.com/p/chromium/wiki/AndroidBuildInstructions |
| Add to .gclient last line: `target_os=['android'];` |
| armv7 |
| - GYP_DEFINES="OS=android" GYP_CROSSCOMPILE=1 ./gyp_libyuv |
| - ninja -j7 -C out/Debug yuv_unittest_apk |
| - ninja -j7 -C out/Release yuv_unittest_apk |
| + gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"arm\"" |
| + gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"arm\"" |
| + ninja -j7 -v -C out/Debug libyuv_unittest_apk |
|
kjellander_chromium
2016/10/04 06:06:21
There's no _apk suffixed target for GN.
Just buil
fbarchard1
2016/10/04 18:23:45
Done.
|
| + ninja -j7 -v -C out/Release libyuv_unittest_apk |
| arm64 |
| - GYP_DEFINES="OS=android target_arch=arm64 target_subarch=arm64" GYP_CROSSCOMPILE=1 ./gyp_libyuv |
| - ninja -j7 -C out/Debug yuv_unittest_apk |
| - ninja -j7 -C out/Release yuv_unittest_apk |
| + gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"arm64\"" |
| + gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"arm64\"" |
| + ninja -j7 -v -C out/Debug libyuv_unittest_apk |
| + ninja -j7 -v -C out/Release libyuv_unittest_apk |
| ia32 |
| - GYP_DEFINES="OS=android target_arch=ia32" GYP_CROSSCOMPILE=1 ./gyp_libyuv |
| - ninja -j7 -C out/Debug yuv_unittest_apk |
| - ninja -j7 -C out/Release yuv_unittest_apk |
| - |
| - GYP_DEFINES="OS=android target_arch=ia32 android_full_debug=1" GYP_CROSSCOMPILE=1 ./gyp_libyuv |
| - ninja -j7 -C out/Debug yuv_unittest_apk |
| + gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"x86\"" |
| + gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"x86\"" |
| + ninja -j7 -v -C out/Debug libyuv_unittest_apk |
| + ninja -j7 -v -C out/Release libyuv_unittest_apk |
| mipsel |
| - GYP_DEFINES="OS=android target_arch=mipsel" GYP_CROSSCOMPILE=1 ./gyp_libyuv |
| - ninja -j7 -C out/Debug yuv_unittest_apk |
| - ninja -j7 -C out/Release yuv_unittest_apk |
| + gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"mipsel\" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=false" |
| + gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mipsel\"" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=false" |
| + ninja -j7 -v -C out/Debug libyuv_unittest_apk |
| + ninja -j7 -v -C out/Release libyuv_unittest_apk |
| + |
| + gn gen out/Release "--args=is_debug=false target_os=\"android\" target_cpu=\"mips64el\"" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=false" |
| + gn gen out/Debug "--args=is_debug=true target_os=\"android\" target_cpu=\"mips64el\"" mips_arch_variant=\"r6\" mips_use_msa=true is_component_build=true is_clang=false" |
| + ninja -j7 -v -C out/Debug libyuv_unittest_apk |
| + ninja -j7 -v -C out/Release libyuv_unittest_apk |
| -arm32 disassembly: |
| +arm disassembly: |
| - third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-objdump -d out/Release/obj/source/libyuv.row_neon.o |
| + third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv/row_common.o >row_common.txt |
| -arm64 disassembly: |
| + third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon.o >row_neon.txt |
| - third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d out/Release/obj/source/libyuv.row_neon64.o |
| + third_party/android_tools/ndk/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d ./out/Release/obj/libyuv_neon/row_neon64.o >row_neon64.txt |
| Running tests: |
| @@ -177,62 +190,12 @@ Running tests: |
| Running test as benchmark: |
| - util/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1" |
| + util/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1" |
| Running test with C code: |
| util/android/test_runner.py gtest -s libyuv_unittest -t 7200 --verbose --release --gtest_filter=* -a "--libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=1 --libyuv_cpu_info=1" |
| -#### Building with GN |
| - |
| - gn gen out/Release "--args=is_debug=false target_cpu=\"x86\"" |
| - gn gen out/Debug "--args=is_debug=true target_cpu=\"x86\"" |
| - ninja -C out/Release |
| - ninja -C out/Debug |
| - |
| -### Building Offical with GN |
| - |
| - gn gen out/Official "--args=is_debug=false is_official_build=true is_chrome_branded=true" |
| - ninja -C out/Official |
| - |
| -#### Building mips with GN |
| - |
| -mipsel |
| - gn gen out/Default "--args=is_debug=false target_cpu=\"mipsel\" target_os = \"android\" mips_arch_variant = \"r6\" mips_use_msa = true is_component_build = true is_clang = false" |
| - ninja -C out/Default |
| - |
| -mips64el |
| - gn gen out/Default "--args=is_debug=false target_cpu=\"mips64el\" target_os = \"android\" mips_arch_variant = \"r6\" mips_use_msa = true is_component_build = true is_clang = false" |
| - ninja -C out/Default |
| - |
| -### Linux |
| - |
| - GYP_DEFINES="target_arch=x64" ./gyp_libyuv |
| - ninja -j7 -C out/Debug |
| - ninja -j7 -C out/Release |
| - |
| - GYP_DEFINES="target_arch=ia32" ./gyp_libyuv |
| - ninja -j7 -C out/Debug |
| - ninja -j7 -C out/Release |
| - |
| -#### CentOS |
| - |
| -On CentOS 32 bit the following work around allows a sync: |
| - |
| - export GYP_DEFINES="host_arch=ia32" |
| - gclient sync |
| - |
| -### Windows Shared Library |
| - |
| -Modify libyuv.gyp from 'static_library' to 'shared_library', and add 'LIBYUV_BUILDING_SHARED_LIBRARY' to 'defines'. |
| - |
| - gclient runhooks |
| - |
| -After this command follow the building the library instructions above. |
| - |
| -If you get a compile error for atlthunk.lib on Windows, read http://www.chromium.org/developers/how-tos/build-instructions-windows |
| - |
| - |
| ### Build targets |
| ninja -C out/Debug libyuv |
| @@ -270,48 +233,6 @@ Release build/install |
| cmake --build . --config Release |
| sudo cmake --build . --target install --config Release |
| -### Windows 8 Phone |
| - |
| -Pre-requisite: |
| - |
| -* Install Visual Studio 2012 and Arm to your environment.<br> |
| - |
| -Then: |
| - |
| - call "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat" |
| - |
| -or with Visual Studio 2013: |
| - |
| - call "c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_arm\vcvarsx86_arm.bat" |
| - nmake /f winarm.mk clean |
| - nmake /f winarm.mk |
| - |
| -### Windows Shared Library |
| - |
| -Modify libyuv.gyp from 'static_library' to 'shared_library', and add 'LIBYUV_BUILDING_SHARED_LIBRARY' to 'defines'. Then run this. |
| - |
| - gclient runhooks |
| - |
| -After this command follow the building the library instructions above. |
| - |
| -If you get a compile error for atlthunk.lib on Windows, read http://www.chromium.org/developers/how-tos/build-instructions-windows |
| - |
| -### 64 bit Windows |
| - |
| - set GYP_DEFINES=target_arch=x64 |
| - gclient runhooks V=1 |
| - |
| -### ARM Linux |
| - |
| - export GYP_DEFINES="target_arch=arm" |
|
kjellander_chromium
2016/10/04 06:06:21
You can still build for ARM Linux. I think target_
fbarchard1
2016/10/04 18:23:45
Done. But it has build errors.
I actually used th
|
| - export CROSSTOOL=`<path>`/arm-none-linux-gnueabi |
| - export CXX=$CROSSTOOL-g++ |
| - export CC=$CROSSTOOL-gcc |
| - export AR=$CROSSTOOL-ar |
| - export AS=$CROSSTOOL-as |
| - export RANLIB=$CROSSTOOL-ranlib |
| - gclient runhooks |
| - |
| ## Running Unittests |
| ### Windows |
| @@ -328,113 +249,16 @@ If you get a compile error for atlthunk.lib on Windows, read http://www.chromium |
| Replace --gtest_filter="*" with specific unittest to run. May include wildcards. e.g. |
| - out/Release/libyuv_unittest --gtest_filter=libyuvTest.I420ToARGB_Opt |
| + out/Release/libyuv_unittest --gtest_filter=*I420ToARGB_Opt |
| ## CPU Emulator tools |
| ### Intel SDE (Software Development Emulator) |
| -Pre-requisite: Install IntelSDE for Windows: http://software.intel.com/en-us/articles/intel-software-development-emulator |
| +Pre-requisite: Install IntelSDE: http://software.intel.com/en-us/articles/intel-software-development-emulator |
| Then run: |
| - c:\intelsde\sde -hsw -- out\release\libyuv_unittest.exe --gtest_filter=* |
| - |
| - |
| -## Memory tools |
|
kjellander_chromium
2016/10/04 06:06:21
You can still use all these memory tools after swi
fbarchard1
2016/10/04 18:23:45
Done.
My intent is to fill in documentation as nee
|
| - |
| -### Running Dr Memory memcheck for Windows |
| - |
| -Pre-requisite: Install Dr Memory for Windows and add it to your path: http://www.drmemory.org/docs/page_install_windows.html |
| - |
| - set GYP_DEFINES=build_for_tool=drmemory target_arch=ia32 |
|
kjellander_chromium
2016/10/04 06:06:21
AFAIK, there's no build_for_tool= variable. I don'
fbarchard1
2016/10/04 18:23:45
Done.
I'll document it as just the runtime tool, b
|
| - call python gyp_libyuv -fninja -G msvs_version=2013 |
| - ninja -C out\Debug |
| - drmemory out\Debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=* |
| - |
| -### Running UBSan |
| - |
| -See Chromium instructions for sanitizers: https://www.chromium.org/developers/testing/undefinedbehaviorsanitizer |
| - |
| -Sanitizers available: TSan, MSan, ASan, UBSan, LSan |
| - |
| - GYP_DEFINES='ubsan=1' gclient runhooks |
| - ninja -C out/Release |
| + c:\intelsde\sde -hsw -- out\Release\libyuv_unittest.exe --gtest_filter=* |
| -### Running Valgrind memcheck |
| - |
| -Memory errors and race conditions can be found by running tests under special memory tools. [Valgrind] [1] is an instrumentation framework for building dynamic analysis tools. Various tests and profilers are built upon it to find memory handling errors and memory leaks, for instance. |
| - |
| -[1]: http://valgrind.org |
| - |
| - solutions = [ |
| - { "name" : "libyuv", |
| - "url" : "https://chromium.googlesource.com/libyuv/libyuv", |
| - "deps_file" : "DEPS", |
| - "managed" : True, |
| - "custom_deps" : { |
| - "libyuv/chromium/src/third_party/valgrind": "https://chromium.googlesource.com/chromium/deps/valgrind/binaries", |
| - }, |
| - "safesync_url": "", |
| - }, |
| - ] |
| - |
| -Then run: |
| - |
| - GYP_DEFINES="clang=0 target_arch=x64 build_for_tool=memcheck" python gyp_libyuv |
| - ninja -C out/Debug |
| - valgrind out/Debug/libyuv_unittest |
| - |
| - |
| -For more information, see http://www.chromium.org/developers/how-tos/using-valgrind |
| - |
| -### Running Thread Sanitizer (TSan) |
| - |
| - GYP_DEFINES="clang=0 target_arch=x64 build_for_tool=tsan" python gyp_libyuv |
|
kjellander_chromium
2016/10/04 06:06:21
This is the old TSan, thus no longer working.
For
|
| - ninja -C out/Debug |
| - valgrind out/Debug/libyuv_unittest |
| - |
| -For more info, see http://www.chromium.org/developers/how-tos/using-valgrind/threadsanitizer |
| - |
| -### Running Address Sanitizer (ASan) |
| - |
| - GYP_DEFINES="clang=0 target_arch=x64 build_for_tool=asan" python gyp_libyuv |
| - ninja -C out/Debug |
| - valgrind out/Debug/libyuv_unittest |
| - |
| -For more info, see http://dev.chromium.org/developers/testing/addresssanitizer |
| - |
| -## Benchmarking |
| - |
| -The unittests can be used to benchmark. |
| - |
| -### Windows |
| - |
| - set LIBYUV_WIDTH=1280 |
| - set LIBYUV_HEIGHT=720 |
| - set LIBYUV_REPEAT=999 |
| - set LIBYUV_FLAGS=-1 |
| - out\Release\libyuv_unittest.exe --gtest_filter=*I420ToARGB_Opt |
|
kjellander_chromium
2016/10/04 06:06:21
These no longer work?
|
| - |
| - |
| -### Linux and Mac |
| - |
| - LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 out/Release/libyuv_unittest --gtest_filter=*I420ToARGB_Opt |
| - |
| - libyuvTest.I420ToARGB_Opt (547 ms) |
| - |
| -Indicates 0.547 ms/frame for 1280 x 720. |
| - |
| -## Making a change |
| - |
| - gclient sync |
| - git checkout -b mycl -t origin/master |
| - git pull |
| - <edit files> |
| - git add -u |
| - git commit -m "my change" |
| - git cl lint |
| - git cl try |
| - git cl upload -r a-reviewer@chomium.org -s |
|
kjellander_chromium
2016/10/04 06:06:21
typo: should be chromium.org
|
| - <once approved..> |
| - git cl land |
| + ~/intelsde/sde -skx -- out/Release/libyuv_unittest --gtest_filter=**I420ToARGB_Opt |