Lines Matching refs:target
19 #include "gn/target.h"
42 Source expansion is used for the action_foreach and copy target types to map
93 This will be different than the target's generated file directory if the
99 relative to the build directory. this us be different than the target's
105 The path to the source file relative to the target's directory. This will
109 "target".
206 const Target* target,
211 ApplyPatternToSourceAsString(target, settings, pattern, source);
220 const Target* target,
229 result_value.append(GetSourceSubstitution(target, settings, source,
239 const Target* target,
244 ApplyPatternToSource(target, settings, pattern, source);
249 void SubstitutionWriter::ApplyListToSource(const Target* target,
255 output->push_back(ApplyPatternToSource(target, settings, item, source));
260 const Target* target,
267 ApplyPatternToSourceAsString(target, settings, item, source));
272 const Target* target,
279 ApplyPatternToSourceAsOutputFile(target, settings, item, source));
284 const Target* target,
291 ApplyListToSource(target, settings, list, source, output);
296 const Target* target,
303 ApplyListToSourceAsString(target, settings, list, source, output);
308 const Target* target,
315 ApplyListToSourceAsOutputFile(target, settings, list, source, output);
320 const Target* target,
329 // only when writing target rules since it can never be used in any
335 GetSourceSubstitution(target, settings, source, type, OUTPUT_RELATIVE,
345 const Target* target,
377 if (target) {
378 return RebasePath(source.value(), target->label().dir(),
382 << " without target";
403 const Target* target,
412 CHECK(GetTargetSubstitution(target, subrange.type, &subst));
421 const Target* target,
426 output->push_back(ApplyPatternToTargetAsOutputFile(target, tool, item));
430 bool SubstitutionWriter::GetTargetSubstitution(const Target* target,
436 target->label().GetUserVisibleName(!target->settings()->is_default());
438 *result = target->label().name();
440 *result = target->label().GetUserVisibleName(false);
443 GetBuildDirAsOutputFile(BuildDirContext(target), BuildDirType::GEN)
448 target->settings()->toolchain_output_subdir().value(), result);
451 GetBuildDirForTargetAsOutputFile(target, BuildDirType::GEN).value(),
455 GetBuildDirForTargetAsOutputFile(target, BuildDirType::OBJ).value(),
458 *result = target->GetComputedOutputName();
467 const Target* target,
470 GetTargetSubstitution(target, type, &result);
476 const Target* target,
485 GetCompilerSubstitution(target, source, subrange.type));
493 const Target* target,
498 output->push_back(ApplyPatternToCompilerAsOutputFile(target, source, item));
503 const Target* target,
508 if (GetTargetSubstitution(target, type, &result))
513 target, target->settings(), source, type, OUTPUT_RELATIVE,
514 target->settings()->build_settings()->build_dir());
519 const Target* target,
527 result.value().append(GetLinkerSubstitution(target, tool, subrange.type));
535 const Target* target,
540 output->push_back(ApplyPatternToLinkerAsOutputFile(target, tool, item));
545 const Target* target,
550 if (GetTargetSubstitution(target, type, &result))
555 // Use the target's value if there is one (it will have no expansion
559 if (target->output_dir().is_null()) {
560 return ApplyPatternToLinkerAsOutputFile(target, tool,
565 RebasePath(target->output_dir().value(),
566 target->settings()->build_settings()->build_dir()),
570 // Use the extension provided on the target if specified, otherwise
571 // fall back on the default. Note that the target's output extension
573 if (!target->output_extension_set())
575 if (target->output_extension().empty())
577 return std::string(".") + target->output_extension();
580 return target->rust_values().crate_name();
582 return target->swift_values().module_name();