summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/gcctoolchain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* gcctoolchain: ensure that arch is passed just onceFawzi Mohamed2014-03-271-2/+4
| | | | | | | the first architecture is kept, and used. Change-Id: I30d0f1f98b0ad53c2133aa9b7da14c86f21de25c Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Gcc: Fix -sysroot option: It is --sysrootTobias Hunger2014-03-241-1/+1
| | | | | | | It is indeed -isysroot and -arch, so leave those alone. Change-Id: I68d44cc1037d6be9be0748abe8fbfa677cce65d5 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* QtcProcess: Introduce a QtcProcess::Arguments classhjk2014-02-191-4/+5
| | | | | | | | | | | | This is used to get a platform-agnostic handle on "command line arguments". It essentially wraps a single QString on Windows, and a QStringList everywhere else. As a consequence, several occurrences of #ifdef Q_OS_* can be removed from the codebase. Change-Id: Ic93118c1bd0bce0ebb58f416d395dbaebb861772 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* FileUtils: Add static method to construct FileNames from Latin1Tobias Hunger2014-02-111-16/+16
| | | | | Change-Id: Ida513eb0537e2ef0c55887d0df21de956e85e983 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Pass PIC/PIE options to gcc when asking for defines.Erik Verbruggen2014-01-101-1/+3
| | | | | | | These influence the __PIC__ and __PIE__ macros. Change-Id: I7938a897584f49b6e1c4d66c6e69ec7adccf2ad6 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Merge remote-tracking branch 'origin/3.0'Eike Ziller2014-01-081-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/debugger/dumper.cpp share/qtcreator/debugger/dumper_p.h share/qtcreator/debugger/test/main.cpp src/plugins/debugger/gdb/classicgdbengine.cpp src/plugins/debugger/gdb/pythongdbengine.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.cpp src/plugins/debugger/lldblib/guest/lldbengineguest.h src/plugins/debugger/lldblib/guest/main.cpp src/plugins/debugger/lldblib/ipcengineguest.cpp src/plugins/debugger/lldblib/ipcengineguest.h src/plugins/debugger/lldblib/ipcenginehost.cpp src/plugins/debugger/lldblib/ipcenginehost.h src/plugins/debugger/lldblib/lldbenginehost.cpp src/plugins/debugger/lldblib/lldboptionspage.cpp src/plugins/qbsprojectmanager/qbsstep.cpp src/plugins/qbsprojectmanager/qbsstep.h src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp src/plugins/qnx/blackberrycheckdevmodestep.cpp src/plugins/qtsupport/debugginghelper.cpp Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
| * Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | | | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | ProjectExplorer: Add history completer to path choosersTobias Hunger2013-11-261-0/+1
|/ | | | | Change-Id: Ifbe1d0d69a131e397d01d26c46ac49aab523aadb Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolChainConfigWidget: Keep custom ABIsTobias Hunger2013-11-141-3/+13
| | | | | | | | | | Do not override a custom ABI when a new set of supported ABIs is detected. Task-number: QTCREATORBUG-10582 Change-Id: I8476b520e80f39037240175cac135ad68752f725 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* gcctoolchain: improve architecture detection on macFawzi Mohamed2013-11-051-2/+7
| | | | | Change-Id: If6346fdf7d159891513764ada6fb4c1fcc9c4a63 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolChain: Update ABIs on MacTobias Hunger2013-11-041-16/+9
| | | | | Change-Id: Ic55389ee8200e3f78f8bb0752411b0a0ae5d5e62 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* ClangToolChain: Allow clang-macx-32 mkspecDaniel Teske2013-11-041-0/+1
| | | | | | | Task-number: QTCREATORBUG-10599 Change-Id: I091db84c81b0ad031744142568cc37d648e9dfb7 Reviewed-by: Andy Shaw <andy.shaw@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* GccToolChain: Improve detection of 64bit/32bitTobias Hunger2013-11-041-35/+43
| | | | | | | | | | | | | | | | | | | | | No longer use the undocumented __X86_64 macro to decide on the word width of a tool chain target. Use __SIZEOF_SIZE_T__ instead. That is documented to be set and should also be applicable outside of the intel x86 world. Some versions of mingw do not define __X86_64 on 64bit intel machines and thus are not properly detected. Update unit tests that try to guess the ABI to use the new macro instead and fix the fallout. Side effect: Some abis are detected in a different sequence now. That should not change the tool chains though as the ABI that is actually used is stored extra and does not referrence that list. Task-number: QTCREATORBUG-10584 Change-Id: Ia9e5909cdff3b057ef74b24c0f2d654a14253c21 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolChain: Make macro retrieval more explicitTobias Hunger2013-10-291-4/+11
| | | | | | | | | | | | Make the retrieval of information on pre-defined macros more explicit and use the information to populate the tool chain with after it is constructed. This avoids doing one run of the compiler per auto-detected debugger during the start-up of Qt Creator. Change-Id: Ie741dccede91079b4126056676c31975f340dbae Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolchain: Move reinterpretOptions into the headerTobias Hunger2013-10-291-6/+0
| | | | | | | Considering that this is a Noop by default we want that inlined. Change-Id: Iefd822ad9e5fc576fb538d9b891f6e3ed3b914aa Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolChain: Make macroCache handling accessibleTobias Hunger2013-10-291-20/+39
| | | | | | | | | | Make the macro Cache accessible to derived classes. This is done so that we can populate that cache with the data the factory/config widget already has and thus reducing the number of times we need to run the compiler. Change-Id: I5ea72a0688c765ae995db66dde3ed6f6672198b6 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolChain: Shorten and move gccPredefinedMacroOptionsTobias Hunger2013-10-291-10/+5
| | | | | | | | Code cosmetics: Shorten gccPredefinedMacroOptions and move it to the method that is actually related to that functionality. Change-Id: I8aae1fd89f58d798f5bec95f16c7b92c44546e4d Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolchain: Do not warn about invalid defines on failed runsTobias Hunger2013-10-291-1/+1
| | | | | | | | Do not warn that the macro data is invalid if gcc failed to run. This avoids spurious warnings when giving a non-executable file, etc. Change-Id: I52d731bf2b9a6fc12faaa74d70488125bffd9299 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* GccToolchain: Whitespace fixTobias Hunger2013-10-291-4/+4
| | | | | Change-Id: I8121267044b533a882dc9cc15209baa13e37ba6c Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Qnx: Add new QccToolChain class for qcc compilersEl Mehdi Fekari2013-10-291-53/+70
| | | | | | | | | | | | | | | | | | | | | Qcc compiler doesn't support "dumpmachine" option provided by the gcc to get a list of supported abis from the compiler, and needs to pass -Wp option when running qcc to get predefined macros and header paths. GccToolChain fails to get those information from qcc and print warning messages on the console. This patch adds new QccToolChain class and reinterprets the compiler options to detect predefined macros and header paths. It also provids list of supported abis and suggested mkspecs. Task-number: QTCREATORBUG-10116 Change-Id: Ic48d5c58c5b957f5a8536248888c9a63ca499f34 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Remove support for Madde-based platforms.Christian Kandeler2013-10-151-13/+1
| | | | | | | | With Nokia's decision to stop support for Harmattan applications in their app store, the last remains of a use case have disappeared. Change-Id: Ia036112de01c8c3a866da3529b4a941db11c7358 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Fix automatic mkspec setting for iOS simulator buildsEike Ziller2013-09-301-1/+2
| | | | | | | | Adds macx-ios-clang to the list of "suggested" mkspecs for Clang/Mac. Change-Id: I3c3f803d651c42e1c2ed7a0f77047a531acf6a0c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Merge remote-tracking branch 'origin/2.8'Eike Ziller2013-09-271-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/extensionsystem/pluginmanager.cpp src/libs/extensionsystem/pluginspec.cpp src/plugins/coreplugin/basefilewizard.cpp src/plugins/coreplugin/coreplugin.pro src/plugins/coreplugin/coreplugin.qbs src/plugins/coreplugin/editormanager/ieditor.cpp src/plugins/coreplugin/externaltool.cpp src/plugins/coreplugin/icore.cpp src/plugins/cpptools/cppmodelmanager.cpp src/plugins/fakevim/fakevimhandler.cpp src/plugins/find/ifindfilter.cpp src/plugins/projectexplorer/buildstep.cpp src/plugins/projectexplorer/devicesupport/idevice.cpp src/plugins/projectexplorer/runconfiguration.cpp src/plugins/vcsbase/vcsbaseeditor.cpp tests/system/suite_debugger/tst_simple_analyze/test.py Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
| * Doc: edit projectexplorer API docsLeena Miettinen2013-09-111-3/+3
| | | | | | | | | | | | | | | | | | | | Fix grammar, punctuation, and style issues. Use standard wording for QDoc commands. Remove \brief commands from function descriptions. Move some function descriptions directly above the functions, so that the \fn command can be removed. Change-Id: Iedf4f0041af24541a982241f99bd4906e86af916 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | Kill ";;" at end of statementNikolai Kosjar2013-09-041-1/+1
| | | | | | | | | | Change-Id: I177094f19978e07f85e42b34701d8f03cd26665e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Introduce an enumeration for toolchain autodetection.Friedemann Kleint2013-09-031-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace boolean "autodetect" by an enumeration with a value AutoDetectionFromSettings indicating whether the Autodetection originates from a settings file. Enable the "Remove" button for those cases. Currently, there is no way to remove toolchains that were once autodetected and are no longer present. This happens for example when working in different MinGW environments, which then clutter up the toolchain options page and dramatically slow down the options page opening since gcc is launched to query the flags, etc. Change-Id: I731168d8694fe56f60d909f9779f83cffa55fd44 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* | Output warning when g++ - invocation fails in GccToolchain.Friedemann Kleint2013-09-031-1/+10
| | | | | | | | | | Change-Id: I5ed05307531f0d3a7850fb251cfa5cbd2a75e09f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Always add command path to environment in GccToolchain.Friedemann Kleint2013-09-031-7/+14
| | | | | | | | | | | | | | | | | | | | Fixes: SOFT ASSERT: "predefinedMacros.startsWith("#define ")" in file .\gcctoolchain.cpp for MinGW since the g++ - invocation to determine the macros causes g++ to launch a subprocess which then fails. Change-Id: If4e7b302ac57f7cbed4982a468bcb1cb3b39f028 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Abi: Add method to guess ABI based on machinet tripletTobias Hunger2013-08-231-67/+7
| | | | | | | | | | | | | | | | This code is moved from the gcc toolchain into the ABI class so that the debugger can reuse it. Change-Id: I9932f41f69eff9ce5982cfb1f0a2e0add33b91c9 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Merge remote-tracking branch 'origin/2.8'Oswald Buddenhagen2013-08-211-0/+2
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppcompletion_test.cpp src/plugins/cpptools/cpptoolsplugin.h src/plugins/projectexplorer/customtoolchain.cpp src/plugins/vcsbase/command.cpp Change-Id: Ie7b3c9e136c0748b41320227c757471259339b48
| * gcctoolchain: fix read only gcc toolchain widgetFawzi Mohamed2013-07-291-0/+2
| | | | | | | | | | | | | | | | disabled editing for platformCodeGenFlags and platformLinkerFlags fields. Change-Id: I16e5009064bbaf4f592a385655d10a15700f8742 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | ProjectExplorer: Streamline ToolchainFactory interfacehjk2013-08-121-66/+52
| | | | | | | | | | Change-Id: I70dba496c4d1eeb9c6767080d179f86f20c1b107 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Gcc: Sanity check predefined macrosTobias Hunger2013-07-251-0/+3
| | | | | | | | | | Change-Id: Ib6054d4e3348a39eddfc6b41c3a530f1d4d199f0 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Gcc: Make sure to not add '\n' to output needlesslyTobias Hunger2013-07-251-1/+5
| | | | | | | | | | Change-Id: I5a5d9cda5aba60cbf20b54934dde3ecdccdd99e3 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* | Gcc: Speed up autodetection of broken gccsTobias Hunger2013-07-251-1/+3
|/ | | | | | | | If a gcc is broken: Do time out earlier and do not try to run it a second time. Change-Id: I8742e507c8aaf4b9174848555f057840ee03ad22 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Workaround for Clang generating wrong debug infoEike Ziller2013-06-251-0/+10
| | | | | | | | | | | | | | | | | Clang obviously takes PWD as a basis for source paths in debug information (AT_comp_dir) if it is set. Since the build tools are not executed in a shell that would set PWD to a sensible value, debug information with Clang is broken if the build environment got a wrong PWD to start with, for example by starting Qt Creator from a shell (which sets PWD). Workaround is to explicitly unset PWD for the build environment used for the Clang tool chain. Task-number: QTCREATORBUG-8825 Change-Id: Ia3e47693121edd61b0ea43bddbb1fcaaac9eb390 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Fix typo (|| operator instead of |)Nikolai Kosjar2013-05-021-1/+1
| | | | | | Change-Id: I2a5707f04175ef96d678e57b7c61fb8d6cec4d75 Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* ProjectExplorer: extended Toolchain::CompilerFlagsSergey Shambir2013-04-301-6/+93
| | | | | | | | Now it provides information about C language standard and C++ extensions. No new behavior added to project managers. Change-Id: Ib7c19641f452a75c9b14cd7e33d104dcd1603720 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* projectexplorer:gccToolchain: add support for platform flagsFawzi Mohamed2013-04-301-12/+113
| | | | | | | | | | Add platformCodegenFlags and platformLinkerFlags to gcc toolchain. This also improves support of compilers (like clang) that can support different architectures by passing the correct flags, but are not detected without passig them. Change-Id: If707558e704f554f27fde7948f7601c5d11835ce Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* ToolChain: added warningFlags() methodSergey Shambir2013-04-231-0/+97
| | | | | | | | Converts toolchain-specific flags in QFlags. Will be useful for ClangCodeModel. Change-Id: I2cff650c952f7c41d3a27535a27fa52b932a0b92 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Clean headers in ProjectExplorer.Friedemann Kleint2013-03-261-4/+0
| | | | | | Change-Id: If61a8a91d2a39c5c97974a5bfcef91892b68d3f1 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* Abi: Fix PowerPC detectionTobias Hunger2013-03-151-3/+14
| | | | | Change-Id: I1e0afe4158f179250b2e0c0ca92c17e01fc5fc4f Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Toolchains: improved gcc predefined macros detectionSergey Shambir2013-03-041-2/+5
| | | | | | | | Added filtering for -fopenmp and options listed here: http://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html Change-Id: I06cb9417db54ff6f4ae22bf0493ca78a13042c38 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Gcc: Improve 32/64bit detection of tool chainsTobias Hunger2013-02-251-24/+62
| | | | | | | Task-number: QTCREATORBUG-8789 Change-Id: I7fd782a789cea2f3ad6186018b975167a578f716 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* ToolChainManager: Drop autoDetected toolchains that are no longer valid.Daniel Teske2013-02-011-1/+5
| | | | | | | Improve isValid for GccToolChain and MsvcToolChain to make that sane. Change-Id: If45cdb4e2666dd1a2ee16c01cb65427362ec29da Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | GccToolChain: detecting GCC 4.8 flag -std=c++1ySergey Shambir2013-01-291-1/+2
| | | | | | | | | | Change-Id: Ia5e92efd325b3164cc6d67b1469d5a63a0238aca Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | Gcc: Display path of compiler as part of the default display nameTobias Hunger2013-01-091-3/+5
| | | | | | | | | | Change-Id: Ie12251ec704bdf2260661ed6fed86e67610b3f86 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk <qthjk@ovi.com>