Commit f28e7077 authored by Christian Hergert's avatar Christian Hergert
Browse files

pipeline: add ide_build_pipeline_is_native()

This is a helper to determine if the target triplet we're building for
matches that of the host.
parent fa74bd17
......@@ -49,6 +49,7 @@
#include "runtimes/ide-runtime.h"
#include "terminal/ide-terminal-util.h"
#include "util/ide-line-reader.h"
#include "util/ide-posix.h"
#include "util/ptyintercept.h"
#include "vcs/ide-vcs.h"
......@@ -3719,3 +3720,21 @@ ide_build_pipeline_get_system_type (IdeBuildPipeline *self)
return self->system_type;
}
/**
* ide_build_pipeline_is_native:
* @self: a #IdeBuildPipeline
*
* Checks to see if the pipeline is building for the native architecture,
* kernel, and system of the host.
*
* This is equivalent to checking if ide_get_system_type() matches the host
* triplet (arch, kernel, system) properties of the pipeline.
*
* Returns: %TRUE if this is a native build, otherwise %FALSE.
*/
gboolean
ide_build_pipeline_is_native (IdeBuildPipeline *self)
{
return g_strcmp0 (self->system_type, ide_get_system_type ()) == 0;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment