Giter VIP home page Giter VIP logo

Comments (4)

waruqi avatar waruqi commented on August 27, 2024 1

The implementation of compile_flags is very old and many rule scripts are not implemented. As a result, some flags are missing.

We need some time to do some refactoring to improve it.

from xmake.

waruqi avatar waruqi commented on August 27, 2024

? I don't know what you mean. and what is your problem?

from xmake.

MinekPo1 avatar MinekPo1 commented on August 27, 2024

Oh sorry, I didn't realize that it was unclear!

I've provided files to reproduce the issue here, but in short, the -std=c++23 flag is not written to compile_flags.txt as I feel it should be, which causes tools using the file to report issues which don't come up when building with xmake.

As another example, see msvc's /await flag, which if omitted can cause tooling using compile_flags.txt to possibly not be aware that using corutines is okay and raise syntax errors (not sure if any tooling that exists would use that flag and use compile_flags.txt tbh but oh well).

from xmake.

SirLynix avatar SirLynix commented on August 27, 2024

It looks like it's on purpose:

-- get compile arguments
local arguments = compiler.compflags(sourcefile, {target = target})
for i, flag in ipairs(arguments) do
-- only export the -I*/-D* flags
if flag == "-I" or flag == "/I" or flag == "-isystem" then
table.insert(flags, flag .. arguments[i + 1])
elseif flag:find('^-[ID]') or flag:find("-isystem", 1, true) then
table.insert(flags, flag)
end
end

I didn't know about compile_flags, what's the difference with compile_commands?

from xmake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.