Skip to content

Commit

Permalink
improve ldflags for autoconf
Browse files Browse the repository at this point in the history
waruqi committed Apr 28, 2024
1 parent 5f1a07e commit 8b8831f
Showing 4 changed files with 5 additions and 13 deletions.
3 changes: 1 addition & 2 deletions tests/projects/qt/quickapp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include <QGuiApplication>
#include <QQmlApplicationEngine>

int main(int argc, char *argv[])
{
int main(int argc, char *argv[]) {
#if QT_VERSION >= 0x50601
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
4 changes: 1 addition & 3 deletions tests/projects/qt/widgetapp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
w.show();

return a.exec();
}
4 changes: 1 addition & 3 deletions tests/projects/qt/widgetapp_static/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#include "mainwindow.h"
#include <QApplication>

int main(int argc, char *argv[])
{
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
w.show();

return a.exec();
}
7 changes: 2 additions & 5 deletions xmake/modules/package/tools/autoconf.lua
Original file line number Diff line number Diff line change
@@ -339,12 +339,9 @@ function buildenvs(package, opt)
if arflags then
envs.ARFLAGS = table.concat(_translate_paths(arflags), ' ')
end
if ldflags then
envs.LDFLAGS = table.concat(_translate_paths(ldflags), ' ')
end
if shflags then
if ldflags or shflags then
-- autoconf does not use SHFLAGS
envs.LDFLAGS = table.concat(_translate_paths(shflags), ' ')
envs.LDFLAGS = table.concat(_translate_paths(table.join(ldflags or {}, shflags)), ' ')
end

-- cross-compilation? pass the full build environments

0 comments on commit 8b8831f

Please sign in to comment.