diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-28 15:20:19 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2016-10-28 15:20:19 +0200 |
commit | ee726002ae4a50ae9334132f6257803bbed23559 (patch) | |
tree | 57fe366d6ad8285812b435b5e47039c004b32064 | |
parent | 9cd8653eef26acdec85c33c350ae47291b99a9b5 (diff) | |
parent | 738ed8e5c0de334d780659bbef8a360154a87221 (diff) |
Merge 1.6 into master
Change-Id: I7ae9ebf1bd9ff2f4062a20dbd50333d055f8f6c3
-rw-r--r-- | share/qbs/modules/bundle/MacOSX-Product-Types.xcspec | 64 | ||||
-rw-r--r-- | share/qbs/modules/cpp/gcc.js | 65 | ||||
-rw-r--r-- | src/lib/corelib/language/evaluatorscriptclass.cpp | 20 | ||||
-rw-r--r-- | src/lib/corelib/language/modulemerger.cpp | 2 | ||||
-rw-r--r-- | src/lib/corelib/language/tst_language.cpp | 8 |
5 files changed, 94 insertions, 65 deletions
diff --git a/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec b/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec index f7766be24..51c778f07 100644 --- a/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec +++ b/share/qbs/modules/bundle/MacOSX-Product-Types.xcspec @@ -90,6 +90,7 @@ "LIBRARY_FLAG_NOSPACE" : "YES", "GCC_INLINES_ARE_PRIVATE_EXTERN" : "YES", "CODE_SIGNING_ALLOWED" : "YES", + "CODE_SIGNING_REQUIRED" : "NO", "EXECUTABLE_EXTENSION" : "dylib", "PUBLIC_HEADERS_FOLDER_PATH" : "\/usr\/local\/include", "DYLIB_INSTALL_NAME_BASE" : "$(INSTALL_PATH)", @@ -112,6 +113,7 @@ "IconNamePrefix" : "TargetLibrary", "DefaultBuildProperties" : { "STRIP_STYLE" : "debugging", + "CLANG_ENABLE_MODULE_DEBUGGING" : "NO", "REZ_EXECUTABLE" : "YES", "FULL_PRODUCT_NAME" : "$(EXECUTABLE_NAME)", "LIBRARY_FLAG_NOSPACE" : "YES", @@ -201,8 +203,8 @@ "Class" : "PBXApplicationProductType", "Name" : "Application", "RunpathSearchPathForEmbeddedFrameworks" : "@executable_path\/..\/Frameworks", - "CanEmbedAddressSanitizerLibraries" : "YES", "ValidateEmbeddedBinaries" : "YES", + "ProvisioningProfileSupported" : "YES", "DefaultTargetName" : "Application", "DefaultBuildProperties" : { "INSTALL_PATH" : "$(LOCAL_APPS_DIR)", @@ -216,10 +218,12 @@ "MACH_O_TYPE" : "mh_execute" }, "BasedOn" : "com.apple.product-type.bundle", + "ProvisioningProfileRequired" : "NO", "PackageTypes" : [ "com.apple.package-type.wrapper.application" ], "Type" : "ProductType", + "CanEmbedCompilerSanitizerLibraries" : "YES", "Identifier" : "com.apple.product-type.application", "IconNamePrefix" : "TargetApp" }, @@ -251,14 +255,17 @@ "IconNamePrefix" : "TargetFramework", "DefaultTargetName" : "Framework", "DefaultBuildProperties" : { - "WRAPPER_EXTENSION" : "framework", - "DYLIB_INSTALL_NAME_BASE" : "$(INSTALL_PATH)", - "STRIP_STYLE" : "debugging", - "FRAMEWORK_VERSION" : "A", - "CODE_SIGNING_ALLOWED" : "YES", + "CODE_SIGNING_REQUIRES_TEAM" : "YES", "LD_DYLIB_INSTALL_NAME" : "$(DYLIB_INSTALL_NAME_BASE:standardizepath)\/$(EXECUTABLE_PATH)", + "CODE_SIGNING_REQUIRED" : "NO", + "CODE_SIGNING_ALLOWED" : "YES", "INSTALL_PATH" : "$(LOCAL_LIBRARY_DIR)\/Frameworks", "WRAPPER_SUFFIX" : ".$(WRAPPER_EXTENSION)", + "WRAPPER_EXTENSION" : "framework", + "FRAMEWORK_VERSION" : "A", + "ENTITLEMENTS_REQUIRED" : "NO", + "STRIP_STYLE" : "debugging", + "DYLIB_INSTALL_NAME_BASE" : "$(INSTALL_PATH)", "MACH_O_TYPE" : "mh_dylib" }, "PackageTypes" : [ @@ -415,6 +422,7 @@ "PackageTypes" : [ "com.apple.package-type.bundle.unit-test" ], + "CanEmbedCompilerSanitizerLibraries" : "YES", "Type" : "ProductType", "BasedOn" : "com.apple.product-type.bundle", "Name" : "Unit Test Bundle", @@ -436,6 +444,7 @@ "PackageTypes" : [ "com.apple.package-type.bundle.unit-test" ], + "ProvisioningProfileSupported" : "YES", "Type" : "ProductType", "BasedOn" : "com.apple.product-type.bundle.unit-test", "Name" : "UI Testing Bundle", @@ -476,7 +485,7 @@ { "IconNamePrefix" : "XPCService", "DefaultTargetName" : "XPC Service", - "CanEmbedAddressSanitizerLibraries" : "YES", + "CanEmbedCompilerSanitizerLibraries" : "YES", "DefaultBuildProperties" : { "MACH_O_TYPE" : "mh_execute", "WRAPPER_EXTENSION" : "xpc" @@ -509,7 +518,10 @@ "Class" : "PBXBundleProductType" }, { - "IconNamePrefix" : "AppExtension", + "Description" : "App Extension", + "Class" : "PBXBundleProductType", + "Name" : "App Extension", + "ProvisioningProfileSupported" : "YES", "DefaultTargetName" : "App Extension", "DefaultBuildProperties" : { "APPLICATION_EXTENSION_API_ONLY" : "YES", @@ -517,15 +529,43 @@ "WRAPPER_EXTENSION" : "appex", "CODE_SIGNING_ALLOWED" : "YES" }, + "BasedOn" : "com.apple.product-type.pluginkit-plugin", + "ProvisioningProfileRequired" : "NO", "PackageTypes" : [ "com.apple.package-type.app-extension" ], "Type" : "ProductType", - "BasedOn" : "com.apple.product-type.pluginkit-plugin", - "Name" : "App Extension", "Identifier" : "com.apple.product-type.app-extension", - "Description" : "App Extension", - "Class" : "PBXBundleProductType" + "IconNamePrefix" : "AppExtension" + }, + { + "Description" : "Xcode Extension", + "Class" : "PBXBundleProductType", + "Name" : "Xcode Extension", + "ProvisioningProfileSupported" : "YES", + "DefaultTargetName" : "Xcode Extension", + "DefaultBuildProperties" : { + "APPLICATION_EXTENSION_API_ONLY" : "YES", + "PRODUCT_SPECIFIC_LDFLAGS" : "-e _XCExtensionMain -lXcodeExtension -weak_framework XcodeKit", + "PRODUCT_TYPE_LIBRARY_SEARCH_PATHS" : [ + "$(inherited)", + "$(DEVELOPER_USR_DIR)\/lib" + ], + "CODE_SIGNING_ALLOWED" : "YES", + "WRAPPER_EXTENSION" : "appex", + "PRODUCT_TYPE_FRAMEWORK_SEARCH_PATHS" : [ + "$(inherited)", + "$(DEVELOPER_FRAMEWORKS_DIR)" + ] + }, + "BasedOn" : "com.apple.product-type.app-extension", + "ProvisioningProfileRequired" : "NO", + "PackageTypes" : [ + "com.apple.package-type.app-extension" + ], + "Type" : "ProductType", + "Identifier" : "com.apple.product-type.xcode-extension", + "IconNamePrefix" : "XcodeExtension" }, { "DefaultTargetName" : "Spotlight", diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 3590bd34c..77b57ab68 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -112,16 +112,6 @@ function linkerFlags(project, product, inputs, output) { var isDarwin = product.moduleProperty("qbs", "targetOS").contains("darwin"); var i, args = additionalCompilerAndLinkerFlags(product); - // ### QBS-966 - if (product.moduleProperty("qbs", "targetOS").contains("android")) { - var sharedStlFilePath = product.moduleProperty("cpp", "sharedStlFilePath"); - if (sharedStlFilePath) - dynamicLibraries.push(sharedStlFilePath); - var staticStlFilePath = product.moduleProperty("cpp", "staticStlFilePath"); - if (staticStlFilePath) - staticLibraries.push(staticStlFilePath); - } - if (output.fileTags.contains("dynamiclibrary")) { args.push(isDarwin ? "-dynamiclib" : "-shared"); @@ -152,11 +142,6 @@ function linkerFlags(project, product, inputs, output) { ["--as-needed"])); } - if (haveTargetOption(product) && useCompilerDriverLinker(product, inputs)) - args.push("-target", product.moduleProperty("cpp", "target")); - else if (isDarwin) - args.push("-arch", product.moduleProperty("cpp", "targetArch")); - var minimumDarwinVersion = ModUtils.moduleProperty(product, "minimumDarwinVersion"); if (minimumDarwinVersion) { var flag = ModUtils.moduleProperty(product, "minimumDarwinVersionLinkerFlag"); @@ -325,6 +310,32 @@ function configFlags(config, isDriver) { args = args.concat(ModUtils.moduleProperty(config, 'driverFlags')); } + if (haveTargetOption(config) && isDriver) { + args.push("-target", config.moduleProperty("cpp", "target")); + } else { + var arch = config.moduleProperty("cpp", "targetArch"); + if (config.moduleProperty("qbs", "targetOS").contains("darwin")) + args.push("-arch", arch); + + if (isDriver) { + if (arch === 'x86_64') + args.push('-m64'); + else if (arch === 'i386') + args.push('-m32'); + + var march = config.moduleProperty("cpp", "machineType"); + if (march) + args.push("-march=" + march); + + var minimumDarwinVersion = ModUtils.moduleProperty(config, "minimumDarwinVersion"); + if (minimumDarwinVersion) { + var flag = ModUtils.moduleProperty(config, "minimumDarwinVersionCompilerFlag"); + if (flag) + args.push(flag + "=" + minimumDarwinVersion); + } + } + } + var frameworkPaths = ModUtils.moduleProperty(config, 'frameworkPaths'); if (frameworkPaths) args = args.concat(frameworkPaths.map(function(path) { return '-F' + path })); @@ -413,30 +424,6 @@ function compilerFlags(product, input, output) { var args = additionalCompilerAndLinkerFlags(product); - if (haveTargetOption(product)) { - args.push("-target", product.moduleProperty("cpp", "target")); - } else { - var arch = product.moduleProperty("cpp", "targetArch"); - if (product.moduleProperty("qbs", "targetOS").contains("darwin")) - args.push("-arch", arch); - - if (arch === 'x86_64') - args.push('-m64'); - else if (arch === 'i386') - args.push('-m32'); - - var march = product.moduleProperty("cpp", "machineType"); - if (march) - args.push("-march=" + march); - - var minimumDarwinVersion = ModUtils.moduleProperty(product, "minimumDarwinVersion"); - if (minimumDarwinVersion) { - var flag = ModUtils.moduleProperty(product, "minimumDarwinVersionCompilerFlag"); - if (flag) - args.push(flag + "=" + minimumDarwinVersion); - } - } - var sysroot = ModUtils.moduleProperty(product, "sysroot"); if (sysroot) { if (product.moduleProperty("qbs", "targetOS").contains("darwin")) diff --git a/src/lib/corelib/language/evaluatorscriptclass.cpp b/src/lib/corelib/language/evaluatorscriptclass.cpp index b14cbc0db..d7f51f4bf 100644 --- a/src/lib/corelib/language/evaluatorscriptclass.cpp +++ b/src/lib/corelib/language/evaluatorscriptclass.cpp @@ -241,24 +241,28 @@ private: setupConvenienceProperty(QLatin1String("outer"), &extraScope, v); } if (value->sourceUsesOriginal()) { - const Item *item = itemOfProperty; - while (item->type() == ItemType::ModuleInstance) - item = item->prototype(); QScriptValue originalValue; - SVConverter converter(scriptClass, object, item->property(*propertyName), item, - propertyName, data, &originalValue, sourceValueStack); - converter.start(); + if (data->item->propertyDeclaration(propertyName->toString()).isScalar()) { + const Item *item = itemOfProperty; + while (item->type() == ItemType::ModuleInstance) + item = item->prototype(); + SVConverter converter(scriptClass, object, item->property(*propertyName), item, + propertyName, data, &originalValue, sourceValueStack); + converter.start(); + } else { + originalValue = engine->newArray(0); + } setupConvenienceProperty(QLatin1String("original"), &extraScope, originalValue); } pushScope(data->evaluator->fileScope(value->file())); pushItemScopes(data->item); - if (value->definingItem()) - pushItemScopes(value->definingItem()); if (itemOfProperty && itemOfProperty->type() != ItemType::ModuleInstance) { // Own properties of module instances must not have the instance itself in the scope. pushScope(*object); } + if (value->definingItem()) + pushItemScopes(value->definingItem()); if (value->exportScope()) pushScope(data->evaluator->scriptValue(value->exportScope())); pushScope(extraScope); diff --git a/src/lib/corelib/language/modulemerger.cpp b/src/lib/corelib/language/modulemerger.cpp index fa082ac16..b5aeb995f 100644 --- a/src/lib/corelib/language/modulemerger.cpp +++ b/src/lib/corelib/language/modulemerger.cpp @@ -254,7 +254,7 @@ void ModuleMerger::appendPrototypeValueToNextChain(Item *moduleProto, const QStr return; if (!m_clonedModulePrototype) { m_clonedModulePrototype = moduleProto->clone(); - m_clonedModulePrototype->setScope(m_mergedModule.item->scope()); + m_clonedModulePrototype->setScope(m_mergedModule.item); } const ValuePtr clonedValue = m_clonedModulePrototype->property(propertyName); QBS_CHECK(clonedValue); diff --git a/src/lib/corelib/language/tst_language.cpp b/src/lib/corelib/language/tst_language.cpp index ccea88737..df5bc1d64 100644 --- a/src/lib/corelib/language/tst_language.cpp +++ b/src/lib/corelib/language/tst_language.cpp @@ -422,7 +422,6 @@ void TestLanguage::defaultValue() propertyName = QStringList() << "modules" << "lower" << "listProp"; propertyValue = getConfigProperty(product->moduleProperties->value(), propertyName); QFETCH(QVariant, expectedListPropValue); - QEXPECT_FAIL("controlling property not overwritten", "QBS-845", Continue); QCOMPARE(propertyValue.toStringList(), expectedListPropValue.toStringList()); } catch (const ErrorInfo &e) { @@ -438,13 +437,13 @@ void TestLanguage::defaultValue_data() QTest::addColumn<QVariant>("expectedProp2Value"); QTest::addColumn<QVariant>("expectedListPropValue"); QTest::newRow("controlling property with random value") << "random" << QVariant("withoutBlubb") - << QVariant(QStringList({"other", "other"})); + << QVariant(QStringList({"other"})); QTest::newRow("controlling property with blubb value") << "blubb" << QVariant("withBlubb") - << QVariant(QStringList({"blubb", "other", "blubb", "other"})); + << QVariant(QStringList({"blubb", "other"})); QTest::newRow("controlling property with egon value") << "egon" << QVariant("withEgon") << QVariant(QStringList({"egon", "other"})); QTest::newRow("controlling property not overwritten") << "" << QVariant("withBlubb") - << QVariant(QStringList({"blubb", "other", "blubb", "other"})); + << QVariant(QStringList({"blubb", "other"})); } void TestLanguage::environmentVariable() @@ -1115,7 +1114,6 @@ void TestLanguage::moduleProperties() QStringList valueStrings; foreach (const QVariant &v, values.toList()) valueStrings += v.toString(); - QEXPECT_FAIL("list_property_depending_on_overridden_property", "QBS-845", Continue); QCOMPARE(valueStrings, expectedValues); } |