Loading...
Searching...
No Matches
JitPlatform.hpp
1#pragma once
2#include <Library/LibrarySettings.hpp>
3
4#include <score/application/ApplicationContext.hpp>
5
6#include <QApplication>
7#include <QDebug>
8#include <QDir>
9#include <QDirIterator>
10
11#include <llvm/ADT/StringMap.h>
12#include <llvm/ADT/StringRef.h>
13
14#if LLVM_VERSION_MAJOR >= 17
15#include <llvm/TargetParser/Host.h>
16#else
17#include <llvm/Support/Host.h>
18#endif
19
20#include <ciso646>
21#include <iostream>
22#include <string>
23#include <vector>
24#if __has_include(<llvm/Config/llvm-config-64.h>)
25#include <llvm/Config/llvm-config-64.h>
26#elif __has_include(<llvm/Config/llvm-config.h>)
27#include <llvm/Config/llvm-config.h>
28#endif
29
30#if defined(__has_feature)
31#if __has_feature(address_sanitizer) && !defined(__SANITIZE_ADDRESS__)
32#define __SANITIZE_ADDRESS__ 1
33#endif
34#endif
35
36#if defined(SCORE_FHS_BUILD)
37#define SCORE_USE_DISTRO_SYSROOT 1
38#else
39#if defined(SCORE_DEPLOYMENT_BUILD)
40#define SCORE_USE_DISTRO_SYSROOT 0
41#else
42#define SCORE_USE_DISTRO_SYSROOT 1
43#endif
44#endif
45
46#include <JitCpp/JitOptions.hpp>
47
48#include <score_git_info.hpp>
49
50namespace Jit
51{
52
53static inline std::string locateSDK()
54{
55 if(QString sdk = qgetenv("SCORE_JIT_SDK"); !sdk.isEmpty())
56 return sdk.toStdString();
57
58 auto& ctx = score::AppContext().settings<Library::Settings::Model>();
59 QString path = ctx.getSDKPath();
60
61 if(QString libPath = QStringLiteral("%1/%2/usr").arg(path).arg(SCORE_TAG_NO_V);
62 QDir(libPath + "/include/c++").exists())
63 {
64 return libPath.toStdString();
65 }
66
67 if(QString libPath = path + "/usr"; QDir(libPath + "/include/c++").exists())
68 {
69 return libPath.toStdString();
70 }
71
72 auto appFolder = qApp->applicationDirPath();
73
74#if !SCORE_FHS_BUILD
75
76#if defined(_WIN32)
77 {
78 QDir d{appFolder};
79 d.cd("sdk");
80 return d.absolutePath().toStdString();
81 }
82#elif defined(__linux__)
83 {
84 QDir d{appFolder};
85 d.cdUp();
86 d.cd("usr");
87 return d.absolutePath().toStdString();
88 }
89#elif defined(__APPLE__)
90 {
91 QDir d{appFolder};
92 d.cdUp();
93 if(d.cd("Frameworks"))
94 {
95 if(d.cd("Score.Framework"))
96 {
97 return d.absolutePath().toStdString();
98 }
99 }
100 auto framework = QString(appFolder + "/Score.Framework");
101 if(QDir{}.exists(framework))
102 return framework.toStdString();
103 else
104 return "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/"
105 "Developer/SDKs/MacOSX.sdk/usr";
106 }
107#endif
108
109#else
110#if defined(__APPLE__)
111 return "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/"
112 "Developer/SDKs/MacOSX.sdk/usr";
113#endif
114 if(QFileInfo("/usr/include/c++").isDir())
115 {
116 return "/usr";
117 }
118 else
119 {
120 return ctx.getSDKPath().toStdString();
121 }
122#endif
123}
124
125static inline void
126populateCompileOptions(std::vector<std::string>& args, CompilerOptions opts)
127{
128 args.push_back("-triple");
129 args.push_back(llvm::sys::getDefaultTargetTriple());
130
131 args.push_back("-target-cpu");
132 args.push_back(llvm::sys::getHostCPUName().lower());
133
134 {
135 llvm::StringMap<bool> HostFeatures;
136#if LLVM_VERSION_MAJOR < 19
137 bool ok = llvm::sys::getHostCPUFeatures(HostFeatures);
138#else
139 constexpr bool ok = true;
140 HostFeatures = llvm::sys::getHostCPUFeatures();
141#endif
142 if(ok)
143 {
144 for(const llvm::StringMapEntry<bool>& F : HostFeatures)
145 {
146 args.push_back("-target-feature");
147 args.push_back((F.second ? "+" : "-") + F.first().str());
148 }
149 }
150 }
151
152 args.push_back("-std=c++2b");
153 args.push_back("-disable-free");
154 args.push_back("-fdeprecated-macro");
155 args.push_back("-fmath-errno");
156 // disappeared in clang 11 args.push_back("-fuse-init-array");
157
158 // args.push_back("-mrelocation-model");
159 // args.push_back("static");
160 args.push_back("-mthread-model");
161 args.push_back("posix");
162 // disappeared in clang 11 args.push_back("-masm-verbose");
163 args.push_back("-mconstructor-aliases");
164
165 // args.push_back("-dwarf-column-info");
166 // args.push_back("-debugger-tuning=gdb");
167
168 args.push_back("-fno-use-cxa-atexit");
169
170 // -Ofast stuff:
171 // args.push_back("-menable-unsafe-fp-math");
172 args.push_back("-fno-signed-zeros");
173 args.push_back("-mreassociate");
174 args.push_back("-freciprocal-math");
175 args.push_back("-fno-rounding-math");
176
177 // disappeared in clang 12 args.push_back("-fno-trapping-math");
178 args.push_back("-ffp-contract=fast");
179
180#if !defined(__linux__) // || (defined(__linux__) && __GLIBC_MINOR__ >= 31)
181 // isn't that great
182 // https://reviews.llvm.org/D74712
183 args.push_back("-Ofast");
184 args.push_back("-menable-no-infs");
185 args.push_back("-menable-no-nans");
186 args.push_back("-ffinite-math-only");
187 args.push_back("-ffast-math");
188#else
189 args.push_back("-O3");
190 args.push_back("-fno-builtin");
191#endif
192
193 // Prevent emitting ___chkstk_ms calls in alloca
194 args.push_back("-mno-stack-arg-probe");
195
196 args.push_back("-fgnuc-version=4.2.1");
197
198#if defined(__APPLE__)
199 args.push_back("-fmax-type-align=16");
200#endif
201 args.push_back("-mrelocation-model");
202 args.push_back("pic");
203 args.push_back("-pic-level");
204 args.push_back("2");
205 //args.push_back("-pic-is-pie");
206
207 // changed from -fvisibility hidden to -fvisibility=hidden in clang 16
208 args.push_back("-fvisibility=hidden");
209
210 args.push_back("-fvisibility-inlines-hidden");
211
212 // // tls:
213 args.push_back("-ftls-model=local-exec");
214 // args.push_back("-fno-emulated-tls");
215
216 // if fsanitize:
217 args.push_back("-mrelax-all");
218 args.push_back("-disable-llvm-verifier");
219 args.push_back("-discard-value-names");
220#if defined(__SANITIZE_ADDRESS__)
221 /*
222
223 args.push_back(
224 "-fsanitize=address,alignment,array-bounds,bool,builtin,enum,float-cast-"
225 "overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-"
226 "attribute,null,pointer-overflow,return,returns-nonnull-attribute,shift-"
227 "base,shift-exponent,signed-integer-overflow,unreachable,vla-bound,vptr,"
228 "unsigned-integer-overflow,implicit-integer-truncation");
229 args.push_back(
230 "-fsanitize-recover=alignment,array-bounds,bool,builtin,enum,float-cast-"
231 "overflow,float-divide-by-zero,function,integer-divide-by-zero,nonnull-"
232 "attribute,null,pointer-overflow,returns-nonnull-attribute,shift-base,"
233 "shift-exponent,signed-integer-overflow,vla-bound,vptr,unsigned-integer-"
234 "overflow,implicit-integer-truncation");
235 args.push_back(
236 "-fsanitize-blacklist=/usr/lib/clang/7.0.0/share/asan_blacklist.txt");
237 args.push_back("-fsanitize-address-use-after-scope");
238 args.push_back("-mdisable-fp-elim");
239 */
240#endif
241 args.push_back("-fno-assume-sane-operator-new");
242 // args.push_back("-fcoroutines-ts");
243 args.push_back("-stack-protector");
244 args.push_back("0");
245 if(opts.NoExceptions)
246 {
247 args.push_back("-fno-rtti");
248 }
249 else
250 {
251#if LLVM_VERSION_MAJOR <= 13
252 args.push_back("-munwind-tables");
253#endif
254
255 args.push_back("-fcxx-exceptions");
256 args.push_back("-fexceptions");
257 args.push_back("-fexternc-nounwind");
258#if defined(_WIN32)
259 args.push_back("-exception-model=seh");
260#endif
261 }
262 args.push_back("-faddrsig");
263
264 // args.push_back("-momit-leaf-frame-pointer");
265 args.push_back("-vectorize-loops");
266 args.push_back("-vectorize-slp");
267}
268
269static inline void populateDefinitions(std::vector<std::string>& args)
270{
271#if defined(__APPLE__)
272 // needed because otherwise readerwriterqueue includes CoreFoundation.h ...
273 args.push_back("-DMOODYCAMEL_MAYBE_ALIGN_TO_CACHELINE=");
274#endif
275 args.push_back("-DBOOST_MATH_DISABLE_FLOAT128=1");
276 args.push_back("-DBOOST_ASIO_DISABLE_CONCEPTS=1");
277 args.push_back("-DBOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING");
278 args.push_back("-DBOOST_MULTI_INDEX_ENABLE_SAFE_MODE");
279 args.push_back("-DQT_CORE_LIB");
280 args.push_back("-DQT_DISABLE_DEPRECATED_BEFORE=0x050800");
281 args.push_back("-DQT_GUI_LIB");
282 args.push_back("-DQT_NETWORK_LIB");
283 args.push_back("-DQT_NO_KEYWORDS");
284 args.push_back("-DQT_QML_LIB");
285 args.push_back("-DQT_QUICK_LIB");
286 args.push_back("-DQT_SERIALPORT_LIB");
287 args.push_back("-DQT_STATICPLUGIN");
288 args.push_back("-DQT_SVG_LIB");
289 args.push_back("-DQT_WEBSOCKETS_LIB");
290 args.push_back("-DQT_WIDGETS_LIB");
291 args.push_back("-DQT_XML_LIB");
292 args.push_back("-DRAPIDJSON_HAS_STDSTRING=1");
293
294 // TLS apparently not yet well supported by lljit :
295 // - undefined references to ___emutls_add_address
296 // - MachO TLV relocations not yet supported
297#if __APPLE__
298 args.push_back("-DSPDLOG_NO_TLS=1");
299 args.push_back("-DMOODYCAMEL_NO_THREAD_LOCAL=1");
300
301 args.push_back("-D__thread=__do_not_use_thread_local__");
302 args.push_back("-Dthread_local=__do_not_use_thread_local__");
303 args.push_back("-D_Thread_local=__do_not_use_thread_local__");
304#endif
305
306#if defined(SCORE_DEBUG)
307 args.push_back("-DSCORE_DEBUG");
308#endif
309 args.push_back("-DSCORE_LIB_BASE");
310 args.push_back("-DSCORE_LIB_DEVICE");
311 args.push_back("-DSCORE_LIB_INSPECTOR");
312 args.push_back("-DSCORE_LIB_LOCALTREE");
313 args.push_back("-DSCORE_LIB_PROCESS");
314 args.push_back("-DSCORE_LIB_STATE");
315 args.push_back("-DSCORE_PLUGIN_GFX");
316 args.push_back("-DSCORE_PLUGIN_REMOTECONTROL");
317 args.push_back("-DSCORE_PLUGIN_NODAL");
318 args.push_back("-DSCORE_PLUGIN_AUDIO");
319 args.push_back("-DSCORE_PLUGIN_AUTOMATION");
320 args.push_back("-DSCORE_PLUGIN_CURVE");
321 args.push_back("-DSCORE_PLUGIN_DATAFLOW");
322 args.push_back("-DSCORE_PLUGIN_DEVICEEXPLORER");
323 args.push_back("-DSCORE_PLUGIN_ENGINE");
324 args.push_back("-DSCORE_PLUGIN_LIBRARY");
325 args.push_back("-DSCORE_PLUGIN_MAPPING");
326 args.push_back("-DSCORE_PLUGIN_MEDIA");
327 args.push_back("-DSCORE_PLUGIN_PROTOCOLS");
328 args.push_back("-DSCORE_PLUGIN_SCENARIO");
329 args.push_back("-DSCORE_PLUGIN_MIDI");
330 args.push_back("-DSCORE_PLUGIN_PROTOCOLS");
331 args.push_back("-DSCORE_PLUGIN_RECORDING");
332 args.push_back("-DSCORE_PLUGIN_TRANSPORT");
333 // args.push_back("-DSCORE_STATIC_PLUGINS");
334 args.push_back("-DTINYSPLINE_DOUBLE_PRECISION");
335 args.push_back("-D_GNU_SOURCE=1");
336 args.push_back("-D__STDC_CONSTANT_MACROS");
337 args.push_back("-D__STDC_FORMAT_MACROS");
338 args.push_back("-D__STDC_LIMIT_MACROS");
339#if defined(FFTW_SINGLE_ONLY)
340 args.push_back("-DFFTW_SINGLE_ONLY");
341#elif defined(FFTW_DOUBLE_ONLY)
342 args.push_back("-DFFTW_DOUBLE_ONLY");
343#endif
344}
345
346static inline auto getPotentialTriples()
347{
348 std::vector<QString> triples;
349 triples.push_back(LLVM_DEFAULT_TARGET_TRIPLE);
350 triples.push_back(LLVM_HOST_TRIPLE);
351#if defined(__x86_64__)
352 triples.push_back("x86_64-pc-linux-gnu");
353#elif defined(__i686__)
354 triples.push_back("i686-pc-linux-gnu");
355#elif defined(__i586__)
356 triples.push_back("i586-pc-linux-gnu");
357#elif defined(__i486__)
358 triples.push_back("i486-pc-linux-gnu");
359#elif defined(__i386__)
360 triples.push_back("i386-pc-linux-gnu");
361#elif defined(__arm__)
362 triples.push_back("armv8-none-linux-gnueabi");
363 triples.push_back("armv8-pc-linux-gnueabi");
364 triples.push_back("armv8-none-linux-gnu");
365 triples.push_back("armv8-pc-linux-gnu");
366 triples.push_back("armv7-none-linux-gnueabi");
367 triples.push_back("armv7-pc-linux-gnueabi");
368 triples.push_back("armv7-none-linux-gnu");
369 triples.push_back("armv7-pc-linux-gnu");
370 triples.push_back("armv6-none-linux-gnueabi");
371 triples.push_back("armv6-pc-linux-gnueabi");
372 triples.push_back("armv6-none-linux-gnu");
373 triples.push_back("armv6-pc-linux-gnu");
374#elif defined(__aarch64__)
375 triples.push_back("aarch64-none-linux-gnueabi");
376 triples.push_back("aarch64-pc-linux-gnueabi");
377 triples.push_back("aarch64-none-linux-gnu");
378 triples.push_back("aarch64-pc-linux-gnu");
379 triples.push_back("aarch64-redhat-linux");
380#endif
381
382 return triples;
383}
423static inline void populateIncludeDirs(std::vector<std::string>& args)
424{
425 auto sdk = locateSDK();
426 auto qsdk = QString::fromStdString(sdk);
427 std::cerr << "\nLooking for sdk in: " << sdk << "\n";
428 qDebug() << "Looking for sdk in: " << qsdk;
429
430 bool sdk_found = true;
431
432 {
433 QDir dir(qsdk);
434 if(!dir.cd("include") || !dir.cd("c++"))
435 {
436 qDebug() << "Unable to locate standard headers, fallback to /usr";
437 qsdk = "/usr";
438 sdk = "/usr";
439 dir.setPath("/usr");
440 if(!dir.cd("include") || !dir.cd("c++"))
441 {
442 qDebug() << "Unable to locate standard headers++";
443 throw std::runtime_error("Unable to compile");
444 }
445 sdk_found = false;
446 }
447 }
448
449 qDebug() << "SDK located: " << qsdk;
450 std::string llvm_lib_version = SCORE_LLVM_VERSION;
451#if defined(__APPLE__) && SCORE_FHS_BUILD
452 llvm_lib_version = "13.0.0";
453#endif
454
455 QDir resDir = QString(qsdk + "/lib/clang");
456 auto entries = resDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
457 if(!entries.empty() && !entries.contains(SCORE_LLVM_VERSION))
458 llvm_lib_version = entries.front().toStdString();
459
460#if defined(__APPLE__) && SCORE_FHS_BUILD
461 std::string appleSharedSdk
462 = "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/"
463 "usr";
464 args.push_back("-resource-dir");
465 args.push_back(appleSharedSdk + "/lib/clang/" + llvm_lib_version);
466#else
467 args.push_back("-resource-dir");
468 args.push_back(sdk + "/lib/clang/" + llvm_lib_version);
469#endif
470
471#if defined(_LIBCPP_VERSION)
472 args.push_back("-stdlib=libc++");
473 args.push_back("-internal-isystem");
474
475#if defined(__APPLE__) && SCORE_FHS_BUILD
476 args.push_back(appleSharedSdk + "/include/c++/v1");
477#else
478 args.push_back(sdk + "/include/c++/v1");
479#endif
480
481#elif defined(_GLIBCXX_RELEASE)
482 // Try to locate the correct libstdc++ folder
483 // TODO these are only heuristics. how to make them better ?
484 {
485 const auto libstdcpp_major = QString::number(_GLIBCXX_RELEASE);
486
487 QDir cpp_dir{"/usr/include/c++"};
488 // Note: as this is only used for debugging we look in the host /usr
489 QDirIterator cpp_it{cpp_dir};
490 while(cpp_it.hasNext())
491 {
492 cpp_it.next();
493 auto ver = cpp_it.fileName();
494 if(!ver.isEmpty() && ver.startsWith(libstdcpp_major))
495 {
496 auto gcc = ver.toStdString();
497
498 // e.g. /usr/include/c++/8.2.1
499 args.push_back("-internal-isystem");
500 args.push_back("/usr/include/c++/" + gcc);
501
502 cpp_dir.cd(ver);
503 for(auto& triple : getPotentialTriples())
504 {
505 if(cpp_dir.exists(triple))
506 {
507 // e.g. /usr/include/c++/8.2.1/x86_64-pc-linux-gnu
508 args.push_back("-internal-isystem");
509 args.push_back("/usr/include/c++/" + gcc + "/" + triple.toStdString());
510 break;
511 }
512 }
513
514 break;
515 }
516 }
517 }
518#endif
519
520#if defined(__APPLE__) && SCORE_FHS_BUILD
521 args.push_back("-internal-isystem");
522 args.push_back(appleSharedSdk + "/lib/clang/" + llvm_lib_version + "/include");
523 args.push_back("-internal-externc-isystem");
524 args.push_back(
525 "/Applications/Xcode.app/Contents/Developer//Platforms/MacOSX.platform/Developer/"
526 "SDKs/MacOSX.sdk/usr/include");
527#else
528 args.push_back("-internal-isystem");
529 args.push_back(sdk + "/lib/clang/" + llvm_lib_version + "/include");
530 args.push_back("-internal-externc-isystem");
531 args.push_back(sdk + "/include");
532#endif
533
534 // -resource-dir
535 // /opt/score-sdk/llvm/lib/clang/11.0.0
536 // -internal-isystem
537 // /opt/score-sdk/llvm/bin/../include/c++/v1
538 // -internal-isystem
539 // /opt/score-sdk/llvm/lib/clang/11.0.0/include
540 //-internal-externc-isystem
542
543 auto include = [&](const std::string& path) {
544 args.push_back("-I" + sdk + "/include/" + path);
545 };
546
547#if defined(__linux__)
548 include("x86_64-linux-gnu"); // #debian
549#endif
550 // include(""); // /usr/include
551 QDirIterator qtVersionFolder{
552 qsdk + "/include/qt/QtCore",
553 {},
554 QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot,
555 {}};
556 std::string qt_version = QT_VERSION_STR;
557 if(qtVersionFolder.hasNext())
558 {
559 QDir sub = qtVersionFolder.next();
560 qt_version = sub.dirName().toStdString();
561 }
562 include("qt");
563 include("qt/QtCore");
564 include("qt/QtCore/" + qt_version);
565 include("qt/QtCore/" + qt_version + "/QtCore");
566 include("qt/QtGui");
567 include("qt/QtGui/" + qt_version);
568 include("qt/QtGui/" + qt_version + "/QtGui");
569 include("qt/QtWidgets");
570 include("qt/QtWidgets/" + qt_version);
571 include("qt/QtWidgets/" + qt_version + "/QtWidgets");
572 include("qt/QtQml");
573 include("qt/QtQml/" + qt_version);
574 include("qt/QtQml/" + qt_version + "/QtQml");
575 include("qt/QtXml");
576 include("qt/QtNetwork");
577 include("qt/QtSvg");
578 include("qt/QtSql");
579 include("qt/QtOpenGL");
580 include("qt/QtShaderTools");
581 include("qt/QtShaderTools/" + qt_version);
582 include("qt/QtShaderTools/" + qt_version + "/QtShaderTools");
583 include("qt/QtSerialBus");
584 include("qt/QtSerialPort");
585
586#if !SCORE_FHS_BUILD
587 bool deploying = true;
588#else
589 bool deploying = false;
590#endif
591
592 if(deploying && sdk_found)
593 {
594 include("score");
595 }
596 else
597 {
598 auto src_include_dirs
599 = {"/3rdparty/libossia/src",
600 "/3rdparty/libossia/3rdparty/boost_1_82_0",
601 "/3rdparty/libossia/3rdparty/nano-signal-slot/include",
602 "/3rdparty/libossia/3rdparty/spdlog/include",
603 "/3rdparty/libossia/3rdparty/brigand/include",
604 "/3rdparty/libossia/3rdparty/Flicks",
605 "/3rdparty/libossia/3rdparty/fmt/include",
606 "/3rdparty/libossia/3rdparty/readerwriterqueue",
607 "/3rdparty/libossia/3rdparty/concurrentqueue",
608 "/3rdparty/libossia/3rdparty/SmallFunction/smallfun/include",
609 "/3rdparty/libossia/3rdparty/websocketpp",
610 "/3rdparty/libossia/3rdparty/rapidjson/include",
611 "/3rdparty/libossia/3rdparty/libremidi/include",
612 "/3rdparty/libossia/3rdparty/oscpack",
613 "/3rdparty/libossia/3rdparty/rnd/include",
614 "/3rdparty/libossia/3rdparty/span/include",
615 "/3rdparty/libossia/3rdparty/tuplet/include",
616 "/3rdparty/libossia/3rdparty/unordered_dense/include",
617 "/3rdparty/libossia/3rdparty/multi_index/include",
618 "/3rdparty/libossia/3rdparty/verdigris/src",
619 "/3rdparty/libossia/3rdparty/weakjack",
620 "/3rdparty/avendish/include",
621 "/src/lib",
622 "/src/plugins/score-lib-state",
623 "/src/plugins/score-lib-device",
624 "/src/plugins/score-lib-process",
625 "/src/plugins/score-lib-inspector",
626 "/src/plugins/score-plugin-avnd",
627 "/src/plugins/score-plugin-gfx",
628 "/src/plugins/score-plugin-jit",
629 "/src/plugins/score-plugin-nodal",
630 "/src/plugins/score-plugin-remotecontrol",
631 "/src/plugins/score-plugin-audio",
632 "/src/plugins/score-plugin-curve",
633 "/src/plugins/score-plugin-dataflow",
634 "/src/plugins/score-plugin-engine",
635 "/src/plugins/score-plugin-scenario",
636 "/src/plugins/score-plugin-library",
637 "/src/plugins/score-plugin-deviceexplorer",
638 "/src/plugins/score-plugin-media",
639 "/src/plugins/score-plugin-loop",
640 "/src/plugins/score-plugin-midi",
641 "/src/plugins/score-plugin-protocols",
642 "/src/plugins/score-plugin-recording",
643 "/src/plugins/score-plugin-automation",
644 "/src/plugins/score-plugin-js",
645 "/src/plugins/score-plugin-mapping"};
646
647 for(auto path : src_include_dirs)
648 {
649 args.push_back("-I" + std::string(SCORE_ROOT_SOURCE_DIR) + path);
650 }
651
652 auto src_build_dirs
653 = {"/.",
654 "/src/lib",
655 "/src/plugins/score-lib-state",
656 "/src/plugins/score-lib-device",
657 "/src/plugins/score-lib-process",
658 "/src/plugins/score-lib-inspector",
659 "/src/plugins/score-plugin-avnd",
660 "/src/plugins/score-plugin-gfx",
661 "/src/plugins/score-plugin-jit",
662 "/src/plugins/score-plugin-nodal",
663 "/src/plugins/score-plugin-remotecontrol",
664 "/src/plugins/score-plugin-audio",
665 "/src/plugins/score-plugin-curve",
666 "/src/plugins/score-plugin-dataflow",
667 "/src/plugins/score-plugin-engine",
668 "/src/plugins/score-plugin-scenario",
669 "/src/plugins/score-plugin-library",
670 "/src/plugins/score-plugin-deviceexplorer",
671 "/src/plugins/score-plugin-media",
672 "/src/plugins/score-plugin-loop",
673 "/src/plugins/score-plugin-midi",
674 "/src/plugins/score-plugin-protocols",
675 "/src/plugins/score-plugin-recording",
676 "/src/plugins/score-plugin-automation",
677 "/src/plugins/score-plugin-js",
678 "/src/plugins/score-plugin-mapping",
679 "/3rdparty/libossia/src"};
680
681 for(auto path : src_build_dirs)
682 {
683 args.push_back("-I" + std::string(SCORE_ROOT_BINARY_DIR) + path);
684 }
685 }
686}
687
688}
Definition LibrarySettings.hpp:46
T & settings() const
Access a specific Settings model instance.
Definition ApplicationContext.hpp:40