Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1089)

Side by Side Diff: tools/gn/lib_file.cc

Issue 1530183005: Special-case paths that appear in libs by not prefixing them with -l. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in previous patch Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/lib_file.h ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "tools/gn/lib_file.h"
6
7 #include "base/logging.h"
8
9 LibFile::LibFile() {}
10
11 LibFile::LibFile(const SourceFile& source_file) : source_file_(source_file) {}
12
13 LibFile::LibFile(const base::StringPiece& lib_name)
14 : name_(lib_name.data(), lib_name.size()) {
15 DCHECK(!lib_name.empty());
16 }
17
18 void LibFile::Swap(LibFile* other) {
19 name_.swap(other->name_);
20 source_file_.swap(other->source_file_);
21 }
22
23 const std::string& LibFile::value() const {
24 return is_source_file() ? source_file_.value() : name_;
25 }
26
27 const SourceFile& LibFile::source_file() const {
28 DCHECK(is_source_file());
29 return source_file_;
30 }
OLDNEW
« no previous file with comments | « tools/gn/lib_file.h ('k') | tools/gn/ninja_binary_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698