2016-01-15 14:57:40 +01:00
|
|
|
/****************************************************************************
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
|
|
|
|
** Contact: https://www.qt.io/licensing/
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** This file is part of Qt Creator.
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
** Commercial License Usage
|
|
|
|
|
** Licensees holding valid commercial Qt licenses may use this file in
|
|
|
|
|
** accordance with the commercial license agreement provided with the
|
|
|
|
|
** Software or, alternatively, in accordance with the terms contained in
|
2016-01-15 14:57:40 +01:00
|
|
|
** a written agreement between you and The Qt Company. For licensing terms
|
|
|
|
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
|
|
|
|
** information use the contact form at https://www.qt.io/contact-us.
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2016-01-15 14:57:40 +01:00
|
|
|
** GNU General Public License Usage
|
|
|
|
|
** Alternatively, this file may be used under the terms of the GNU
|
|
|
|
|
** General Public License version 3 as published by the Free Software
|
|
|
|
|
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
|
|
|
|
|
** included in the packaging of this file. Please review the following
|
|
|
|
|
** information to ensure the GNU General Public License requirements will
|
|
|
|
|
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
|
2012-04-18 20:30:57 +03:00
|
|
|
**
|
2012-10-02 09:12:39 +02:00
|
|
|
****************************************************************************/
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2016-03-18 07:55:01 +01:00
|
|
|
#pragma once
|
2012-04-18 20:30:57 +03:00
|
|
|
|
|
|
|
|
#include <projectexplorer/gcctoolchain.h>
|
|
|
|
|
|
|
|
|
|
namespace Android {
|
|
|
|
|
namespace Internal {
|
|
|
|
|
|
2018-10-25 18:12:43 +02:00
|
|
|
using ToolChainList = QList<ProjectExplorer::ToolChain *>;
|
|
|
|
|
using CToolChainList = const QList<ProjectExplorer::ToolChain *>;
|
|
|
|
|
|
|
|
|
|
class AndroidToolChain : public ProjectExplorer::ClangToolChain
|
2012-04-18 20:30:57 +03:00
|
|
|
{
|
|
|
|
|
public:
|
2015-07-07 13:39:40 +02:00
|
|
|
~AndroidToolChain() override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2015-07-07 13:39:40 +02:00
|
|
|
QString typeDisplayName() const override;
|
|
|
|
|
bool isValid() const override;
|
|
|
|
|
void addToEnvironment(Utils::Environment &env) const override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2017-11-06 16:00:25 +01:00
|
|
|
Utils::FileName suggestedDebugger() const override;
|
2013-01-25 16:49:22 +01:00
|
|
|
Utils::FileName suggestedGdbServer() const;
|
2019-05-27 14:22:15 +02:00
|
|
|
QStringList suggestedMkspecList() const override;
|
2019-05-15 10:45:36 +02:00
|
|
|
Utils::FileName makeCommand(const Utils::Environment &environment) const override;
|
2018-10-25 18:12:43 +02:00
|
|
|
bool fromMap(const QVariantMap &data) override;
|
2017-11-06 16:00:25 +01:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
protected:
|
2016-03-04 15:33:16 +01:00
|
|
|
DetectedAbisResult detectSupportedAbis() const override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
|
|
|
|
private:
|
2018-10-25 18:12:43 +02:00
|
|
|
explicit AndroidToolChain();
|
2013-08-28 13:34:24 +02:00
|
|
|
|
2012-04-18 20:30:57 +03:00
|
|
|
friend class AndroidToolChainFactory;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class AndroidToolChainFactory : public ProjectExplorer::ToolChainFactory
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
AndroidToolChainFactory();
|
|
|
|
|
|
2018-10-25 18:12:43 +02:00
|
|
|
ToolChainList autoDetect(CToolChainList &alreadyKnown) override;
|
2012-04-18 20:30:57 +03:00
|
|
|
|
2013-02-14 15:51:59 +01:00
|
|
|
class AndroidToolChainInformation
|
|
|
|
|
{
|
|
|
|
|
public:
|
2016-12-16 00:43:14 +01:00
|
|
|
Core::Id language;
|
2013-02-14 15:51:59 +01:00
|
|
|
Utils::FileName compilerCommand;
|
2014-11-18 18:37:05 +01:00
|
|
|
ProjectExplorer::Abi abi;
|
2013-02-14 15:51:59 +01:00
|
|
|
QString version;
|
|
|
|
|
};
|
|
|
|
|
|
2018-10-25 18:12:43 +02:00
|
|
|
static ToolChainList autodetectToolChainsForNdk(CToolChainList &alreadyKnown);
|
2012-04-18 20:30:57 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace Internal
|
|
|
|
|
} // namespace Android
|