Skip to content

Commit

Permalink
GN: Build libvpx
Browse files Browse the repository at this point in the history
* Changes the include order of YASM
Default includes need to be put to the end for YASM.

In particular there are several versions of x86inc.asm in the tree and
libvpx requires its own version. This change in order allows libvpx to
include its own version.

* Roll libvpx to include BUILD.gn.

libvpx now builds on x86 posix.

R=brettw@chromium.org, scherkus@chromium.org, tomfinegan@chromium.org

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

Cr-Commit-Position: refs/heads/master@{#294932}
  • Loading branch information
Alpha Lam committed Sep 15, 2014
1 parent 1ab9b70 commit 01da7dc
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 36 deletions.
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ vars = {
'pdfium_git': 'https://pdfium.googlesource.com',
'skia_git': 'https://skia.googlesource.com',
'boringssl_git': 'https://boringssl.googlesource.com',
'libvpx_revision': 'd95585fb0ec024f6abd96f7b02e0df58019d46af', # r291859
'libvpx_revision': '4947d55857acf2bf968016a7a00fe2b10fd52131',
'sfntly_revision': '1bdaae8fc788a5ac8936d68bf24f37d977a13dac',
'skia_revision': 'f0ddf33f1954489d45e4f2d9c8712eac60539c65',
# Three lines of non-changing comments so that
Expand Down
35 changes: 14 additions & 21 deletions media/cast/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,17 @@ source_set("sender") {
"sender/video_encoder_impl.cc",
"sender/video_sender.h",
"sender/video_sender.cc",
# "sender/vp8_encoder.cc",
# "sender/vp8_encoder.h",
"sender/vp8_encoder.cc",
"sender/vp8_encoder.h",
]

deps = [
":common",
":net",
"//media",
"//media:shared_memory_support",
"//third_party/libvpx",
"//third_party/opus",
# TODO(hclam): libvpx support.
# "//third_party/libvpx",
]
}

Expand All @@ -146,14 +145,12 @@ source_set("receiver") {
"cast_receiver.h",
"receiver/audio_decoder.cc",
"receiver/audio_decoder.h",
# TODO(hclam): Libvpx support.
# "receiver/cast_receiver_impl.cc",
# "receiver/cast_receiver_impl.h",
"receiver/cast_receiver_impl.cc",
"receiver/cast_receiver_impl.h",
"receiver/frame_receiver.cc",
"receiver/frame_receiver.h",
# TODO(hclam): Need libvpx support.
# "receiver/video_decoder.cc",
# "receiver/video_decoder.h",
"receiver/video_decoder.cc",
"receiver/video_decoder.h",
]

deps = [
Expand All @@ -162,8 +159,7 @@ source_set("receiver") {
"//media",
"//media:shared_memory_support",
"//third_party/opus",
# TODO(hclam): libvpx support.
# "//third_party/libvpx",
"//third_party/libvpx",
"//ui/gfx",
]
}
Expand All @@ -188,9 +184,8 @@ source_set("test_support") {
"test/utility/barcode.h",
"test/utility/default_config.cc",
"test/utility/default_config.h",
# TODO(hclam): libvpx support.
# "test/utility/in_process_receiver.cc",
# "test/utility/in_process_receiver.h",
"test/utility/in_process_receiver.cc",
"test/utility/in_process_receiver.h",
"test/utility/input_builder.cc",
"test/utility/input_builder.h",
"test/utility/net_utility.cc",
Expand Down Expand Up @@ -253,16 +248,14 @@ test("cast_unittests") {
"net/udp_transport_unittest.cc",
"receiver/audio_decoder_unittest.cc",
"receiver/frame_receiver_unittest.cc",
# TODO(hclam): libvpx support.
# "receiver/video_decoder_unittest.cc",
"receiver/video_decoder_unittest.cc",
"sender/audio_encoder_unittest.cc",
"sender/audio_sender_unittest.cc",
"sender/congestion_control_unittest.cc",
"sender/external_video_encoder_unittest.cc",
# TODO(hclam): libvpx support.
# "sender/video_encoder_impl_unittest.cc",
# "sender/video_sender_unittest.cc",
# "test/end2end_unittest.cc",
"sender/video_encoder_impl_unittest.cc",
"sender/video_sender_unittest.cc",
"test/end2end_unittest.cc",
"test/fake_receiver_time_offset_estimator.cc",
"test/fake_receiver_time_offset_estimator.h",
"test/fake_video_encode_accelerator.cc",
Expand Down
2 changes: 1 addition & 1 deletion media/media_options.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ linux_link_pulseaudio = false

# TODO(ajwong): Enable libvpx once that's converted.
media_use_ffmpeg = true
media_use_libvpx = false
media_use_libvpx = true
if (is_android || is_ios) {
# Android and iOS don't use ffmpeg or libvpx.
media_use_ffmpeg = false
Expand Down
27 changes: 14 additions & 13 deletions third_party/yasm/yasm_assemble.gni
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ if (is_mac || is_ios) {
}
}

# Default yasm include dirs. Make it match the native build (source root and
# root generated code directory).
_yasm_flags += [
"-I.",
# Using "//." will produce a relative path "../.." which looks better than
# "../../" which will result from using "//" as the base (although both
# work). This is because rebase_path will terminate the result in a slash if
# the input ends in a slash.
"-I" + rebase_path("//.", root_build_dir),
"-I" + rebase_path(root_gen_dir, root_build_dir),
]

if (is_win) {
asm_obj_extension = "obj"
} else {
Expand Down Expand Up @@ -142,13 +130,26 @@ template("yasm_assemble") {
args += invoker.yasm_flags
}

# Extra include directories.
# User defined include dirs go first.
if (defined(invoker.include_dirs)) {
foreach(include, invoker.include_dirs) {
args += [ "-I" + rebase_path(include, root_build_dir) ]
}
}

# Default yasm include dirs. Make it match the native build (source root and
# root generated code directory).
# This goes to the end of include list.
args += [
# Using "//." will produce a relative path "../.." which looks better than
# "../../" which will result from using "//" as the base (although both
# work). This is because rebase_path will terminate the result in a
# slash if the input ends in a slash.
"-I" + rebase_path("//.", root_build_dir),
"-I" + rebase_path(root_gen_dir, root_build_dir),
]


# Extra defines.
if (defined(invoker.defines)) {
foreach(def, invoker.defines) {
Expand Down

0 comments on commit 01da7dc

Please sign in to comment.